-
Notifications
You must be signed in to change notification settings - Fork 53
Uncaught Error: spawn ENOENT #11
Comments
I am having the same issue. I am using rbenv, and I kept getting this error until I installed rubocop in the system ruby. |
I'm using RVM and getting this problem. Spawning atom from the same shell as rvm is being setup in. Is this by design, will it ONLY work with system wide ruby installations? |
@rogernordqvist I'm using RVM as well and Rubocop Executable Path like this works just fine:
|
Is there a workaround for this? I'm having the same problem. I use RVM and when running |
@olafurg It works fine for me with RVM. |
for rbenv users: run |
Thank you @szimek. I missed the part about setting the executable path in |
@karlbateman if I had to guess, your rubocop is too old. |
@steelbrain v0.34.2 |
So I think I divined why this is happening, at least for me: I was opening atom faster than rvm could switch to the right gemset. |
@karlbateman if you haven't already figured this out, you placed a directory in the I'm marking this as closed since this is a user configuration issue and not a problem with the package itself. |
@Arcanemagus I hate to say this, but I think there is a problem with how the package functions. I was wrong before. I'm opening atom in a directory with rvm setup, and every time I do I get the ENOENT error. I have no idea why. Everything is correct, and sometimes it works. |
I'm able to reproduce it specifically now. It here's the process for getting it to work:
This works. Now for how to reproduce the error:
Now you're screwed. Even if you close this window project and reopen it with |
I suspect it's the difference between: https://github.com/AtomLinter/linter-eslint/blob/master/src/worker.js#L33-L52 and https://github.com/AtomLinter/linter-rubocop/blob/master/index.coffee#L27 |
@krainboltgreene
Your "error case" there is a case of the latter where you are expecting the environment to match what you are in when you launch
|
Excuse the previous two comments, for me this is a pretty annoying result of what should be essentially the same two adapter pattern packages doing pretty much the same exact thing. Somehow the eslint version seems to be getting special treatment because electron happens to be a JS environment. |
Node modules are by design completely self contained, with their dependencies guaranteed to be part of them (or in newer smarter Node versions, at the same level as them). Ruby gems depend on their dependencies to be installed on the system, and able to be found via the environment. The two models of dependency are entirely different. With Node it's relatively simple since all you need are file paths and once you have the base path figured out the rest is (relatively) easy to do. Figuring out the base path can be a bit tricky, but that's a different story. Ruby gems though depend on the environment they are ran under to determine what is available to them instead of the file paths that things are located at. I'm barely even a beginner with Ruby though, so I could be completely misunderstanding things and would absolutely love to be corrected since I simply don't know for sure. This is just how I see it from the myriad of issues people have filed on Ruby related projects. Python projects have a similar set of issues, as normally their dependencies are resolved via the environment as well ( |
This error happens when path to
rubocop
binary is missing or invalid. I installed a few packages at the same time and it took me a while to find out which one was causing this error. Wouldn't it be possible to throw some more detailed error message ifrubocop
binary can't be found?The text was updated successfully, but these errors were encountered: