-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I get a file not found error from rubocop (using linter-rubocop) #57
Comments
Hi @jaresty I'll look into it, And the output of:
I have |
It happens with any ruby file at all. I'm not sure if it's a Thanks, 2014年5月26日月曜日、Maxime [email protected]さんは書きました:
Best, |
@jaresty I edited my message, as you answered by mail you didn't noticed it. It seems more an issue with your installation of Also can you try to lint a file with the command line directly in shell with: |
I'm seeing some new errors in the console:
|
First try to update I'm looking into it. |
Did you install ruby with rvm? I will update rubocop as soon as I get back 2014年5月26日月曜日、Maxime [email protected]さんは書きました:
Best, |
Yes, installed with rvm too ;) btw co-workers are telling me that https://github.com/sstephenson/rbenv is better now than RVM (fyi) Can I have an example file with his extension which fails? Into a gist. |
It's looking for |
Right: I don't know where that file name is coming from; I assumed it was 2014年5月26日月曜日、Maxime [email protected]さんは書きました:
Best, |
@jaresty Yep, it's intern to Linter plugin. To lint on modify, we copy the text buffer into a temporary file which will be used by the specific linter. Normally it should add the correct extension to the file, so something is going wrong. When you have time, give me a not working example file ;) |
Could you send me an example file that works for you too? 2014年5月26日月曜日、Maxime [email protected]さんは書きました:
Best, |
This file is named
|
Hi @jaresty I add so much work this week, gonna look more into it today. But I have problem to reproduce :/ With your file, on OSX 10.9.3, ruby 2.0.0p451, rubocop 0.22.0 I have no errors: |
Would it help if I could show you? I can screen share with google plus I 2014年5月30日金曜日、Maxime [email protected]さんは書きました:
Best, |
@jaresty Okey It seems to doesn't find the temporary file created from the buffer, on what OSX version are you working? They may be an issue while creating the temp file. |
I'm on Mavericks (10.9), but this happened on my work machine running 10.8 Best, On Fri, May 30, 2014 at 10:31 AM, Maxime Tyler [email protected]
|
Are other linters working? Like the |
jshint doesn't seem to throw errors, but I don't see any visible linting Best, On Fri, May 30, 2014 at 10:35 AM, Maxime Tyler [email protected]
|
@jaresty Looks like you are the only one who can debug this! Can you check if the https://www.npmjs.org/package/temp package works on your system? Sounds like it doesn't create the file from the editor buffer. I can help you with this if you don't have any experience into node and javascript. |
What command should I run to test the package? 2014年5月30日金曜日、Maxime [email protected]さんは書きました:
Best, |
Is there some sample code I could look to to get a specific example? Where Thanks, Josh Best, On Mon, Jun 2, 2014 at 9:34 AM, Maxime Tyler [email protected]
|
I used the example I found on the module website, copied and pasted into // Fake data // Process the data (note: error handling omitted)
Best, On Mon, Jun 2, 2014 at 11:15 AM, Josh Aresty [email protected] wrote:
|
Write this in
And then run in your shell: You need to install the module temp by running: |
When I run this code, the result is "2". It works on my system. Best, On Mon, Jun 2, 2014 at 11:45 AM, Maxime Tyler [email protected]
|
I think I've figured out the issue:On a mac when you install rubocop using rvm and try to set up the linter-rubocop package to point to the rvm (not the mac-system) rubocop, that file contains the line |
Mind blown Waaaahou! |
@jaresty, try installing atom command line aliases and then start atom from the command line. This issue exists in a bunch of the linters in sublime as well and that fixes the issue there. The underlying problem being that certain package managers like nodenv, rbenv, rvm... only install their path in the bash profile, and in osx this file does not get added to the standard application context. I would suggest that we do an interactive process for discovering a linter location. Each linter could provide guesses for the linter install location, and failing that the base linter could alert the user to input the base linter location so that they are told when the above issue results in not finding the linter executable requirement. |
Can't the bash_profile not be loaded into the atom / linter environment? This would solve this issue more automatically and terminal commands would also work in linters. |
It could, however there are still those among us who do not use bash profile as well. I use fish, and a couple other people around my office use zsh, neither of which use the bash_profile for sourcing path information by default. So even if we pulled the bash profile we would not guarantee access to the correct path data. Though I would love to see atom automatically include the bash profile path info. |
@park9140 that did it. Good idea-thanks! |
The specific issue here seems to be resolved. Closing, but see #150 for @johanneswuerbach's suggesting of loading the profile into Atom. |
When editing a file, I see no linting, but if I open the javascript console I can see an error message that says "env: ruby_executable_hooks: No such file or directory".
/Users/jaresty/.rvm/gems/ruby-2.1.2/bin/rubocop --format emacs /var/folders/2_/7s_9bc4s5q586np5tmjh3tn80000gr/T/114421-34324-5q1bi0source.ruby
The text was updated successfully, but these errors were encountered: