Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Error when rubocop is run: Error: env: ruby_executable_hooks: No such file or directory #62

Closed
Eschon opened this issue Aug 10, 2015 · 15 comments

Comments

@Eschon
Copy link

Eschon commented Aug 10, 2015

This is somewhat similar to #61 but I get a different Error Message.
screen shot 2015-08-10 at 11 47 42

I'm use Atom 1.0.5 on OS X 10.10.4

This started happening after I upgraded from 0.2.6 to 0.3.1. I don't know if 0.3.0 has the same problem.

@Janther
Copy link

Janther commented Aug 10, 2015

I get the same problem when I don't start atom from the command line (from the icon or when atom restarts after an update).
I just quit atom and start it from the command line.

@Eschon
Copy link
Author

Eschon commented Aug 11, 2015

@Janther I always start Atom from the command line. I tried to enable linter-rubocop again to make sure I din't accidentally start it some other way.

Now I don't get the error from above anymore, but I get a new Error:

Error: warning: parser/current is loading parser/ruby21, which recognizes
warning: 2.1.6-compliant syntax, but you are running 2.1.5.
{"metadata":{"rubocop_version":"0.31.0","ruby_engine":"ruby","ruby_version":"2.1.5","ruby_patchlevel":"273","ruby_platform":"x86_64-darwin14.0"},"files":[{"path":"../../../../../var/folders/rh/0xm8ygv57lj_2t187v1c3fgm0000gp/T/814724408d5a864f270078e7fed72f466418d5d32a2d0605555c8f82fe5ecf4d","offenses":[{"severity":"convention","message":"Space inside { missing.","cop_name":"Style/SpaceInsideHashLiteralBraces","corrected":false,"location":{"line":37,"column":11,"length":1}},{"severity":"convention","message":"Space inside } missing.","cop_name":"Style/SpaceInsideHashLiteralBraces","corrected":false,"location":{"line":37,"column":31,"length":1}},{"severity":"convention","message":"Line is too long. [84/80]","cop_name":"Metrics/LineLength","corrected":null,"location":{"line":56,"column":81,"length":4}},{"severity":"convention","message":"Line is too long. [105/80]","cop_name":"Metrics/LineLength","corrected":null,"location":{"line":59,"column":81,"length":25}},{"severity":"convention","message":"Line is too long. [101/80]","cop_name":"Metrics/LineLength","corrected":null,"location":{"line":70,"column":81,"length":21}},{"severity":"convention","message":"Line is too long. [89/80]","cop_name":"Metrics/LineLength","corrected":null,"location":{"line":86,"column":81,"length":9}}]}],"summary":{"offense_count":6,"target_file_count":1,"inspected_file_count":1}}
  at /Users/egon/.atom/packages/linter-rubocop/index.coffee:42:27
  at FSReqWrap.oncomplete (fs.js:77:15)

Since the error said something about recognising 2.1.6 but running 2.1.5, I installed 2.1.6 using rvm, set it to default, installed rubocop and updated the executablePath in the linter-rubocop settings.
Still the same error occurs.

@Janther
Copy link

Janther commented Aug 11, 2015

I updated atom and linter-rubocop yesterday and got the same but since but the new error you get is addressed #61 it's a warning that the gem rubocop throws and they blame the warning on the gem parser and they blame them on the ruby language.
It's quite a mess but this warning has been around for some time in rubocop, the issue rubocop/rubocop#1819 dates from April.
The linter had effectively avoided it till now.

@Eschon
Copy link
Author

Eschon commented Aug 11, 2015

Oh you're right now its the same as #61.
I'll close this for now since I can't reproduce my original issue.

@Eschon Eschon closed this as completed Aug 11, 2015
@betarelease
Copy link

I am getting this again on atom 1.0.19 and linter-rubocop at 0.4.4. I would reopen it.

@caseywebdev
Copy link
Contributor

@betarelease make sure you're using the latest rubocop version (0.34.2) and also that your command setting is correct in the rubocop-linter settings.

@bhushangahire
Copy link

Any update on this issue? I am getting the same error

@Arcanemagus
Copy link
Member

@bhushangahire The only issue reported so far is due to OS X's handling of the application environment (or more specifically, the lack thereof) of things launched from the GUI.

If you are on OS X try launching Atom from a terminal window and if that works try explicitly setting the path in your settings.

@bhushangahire
Copy link

I just changed in rubocop path /bin to /wrapper and it worked

@rubyconvict
Copy link

@bhushangahire Your workaround helped me, by the way, I have the directory and it is named wrappers.

@kkirsche
Copy link

@bhushangahire your workaround worked for me. Thanks!

@ThatsNinja
Copy link

@bhushangahire 👍 kudos!

@bhushangahire
Copy link

Great

@benhutchins
Copy link

@bhushangahire 👍 Thanks

@fifiteen82726
Copy link

Does anyone understand why it works? It still works even in 2020. What the heck!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants