castwide / vscode-solargraph

A Visual Studio Code extension for Solargraph.
Other
425 stars 24 forks source link

Solargraph not found with VSCode on Arch Linux #22

Closed egeexyz closed 6 years ago

egeexyz commented 6 years ago

I've installed VSCode from the AUR, and I'm running binary version 1.20.0. I've got my solargraph gem installed in my local path located /home/egee/.gem/ruby/2.5.0/bin/solargraph (notice not installed in my /usr/ directory, no sudo required). I can run solargraph from any terminal, including the terminal from within VScode.

When I launch VSCode and open a Ruby file, I get the error message Solargraph gem not found. Run `gem install solargraph` or update your Gemfile..

Any idea what's going on here? My other Ruby extensions such as rubocop work just fine with VSCode.

castwide commented 6 years ago

Do you get any error messages in the developer console?

Are you using a Ruby installation manager like rvm? The extension will try to run solargraph from your workspace, so it might be using a different version of Ruby if, for example, there's a .ruby-version file in there.

You can also try setting solargraph.commandPath to the executable's absolute path.