castwide / atom-solargraph

An Atom package for Solargraph.
MIT License
39 stars 5 forks source link

/bin/bash: solargraph: command not found #6

Closed ghost closed 5 years ago

ghost commented 6 years ago

Using Atom v1.26.0 x64. OS X 10.11.6. Ruby 2.5.0 w/ RVM.

Server.ts:41 Starting the server
main.js? [sm]:62 Solargraph package activated.
Server.ts:49 /bin/bash: solargraph: command not found

internal/process/next_tick.js:109 Uncaught (in promise) undefined
castwide commented 6 years ago
  1. Make sure the Solargraph gem is installed (gem install solargraph)

  2. Since you're using RVM, make sure it's installed on the same version of Ruby that your open workspace uses. The package tries to run Solargraph with your workspace as the working directory, so it should use whatever Ruby is specified, e.g., in a .ruby-version file.

ghost commented 6 years ago

The gem is installed in the default gemset. My project uses the same ruby version (as specified in .ruby-version) but specifies a different gemset in .ruby_gemset. Is this the issue perhaps? Installing in the same gemset is going to be a problem for me due to a dependency collision (tilt >= 2.0 breaks stuff for me).

castwide commented 6 years ago

Yeah, I suspect that's the problem. One thing you can do to test it is temporarily rename the .ruby_gemset file before opening Atom.

The package probably needs a configuration option that lets you specify a path for the Solargraph executable.

ghost commented 6 years ago

Well, that did get me further. I then ran into a bunch of these,

Required path <some_required_file> could not be found in the workspace or gems,

which would be expected because they are in the gemset for my project.

castwide commented 6 years ago

Sometimes that error indicates that YARD documentation for the gem couldn't be found, even though the gem itself was. You can run yard gems to generate the documentation.

In an upcoming version, it won't emit that error anymore, but missing/undocumented gems will be optionally reported in diagnostics.