castwide / vscode-solargraph

A Visual Studio Code extension for Solargraph.
Other
423 stars 26 forks source link

Updating Solargraph gem button does not work in VS code #224

Open HundredBillion opened 3 years ago

HundredBillion commented 3 years ago

I am getting the "A new version of Solargraph" message in VS code. When I click the Update Now button, I get an error and it can't update.

Screen Shot 2021-06-17 at 1 52 51 PM Screen Shot 2021-06-17 at 1 53 34 PM

I'm running VS code 1.57.0 on a Mac 11.2.2 And I have Rails 5.2.3 and Ruby 2.6.2

I do not have solargraph as a gem in my gemfile, I just installed it as a VS code extension.

castwide commented 3 years ago

The easiest workaround is to run gem install solargraph from the command line instead.

One possible cause is that you're using a system installation of Ruby that requires sudo to install gems.

cmer commented 3 years ago

Same issue here. I'm using rbenv and not a system-wide installation.

helloguille commented 2 years ago

In my case was that I run solargraph within a Docker container. It would be nice to be able to disable this alert somehow.

castwide commented 2 years ago

I'll look into Docker container integration. I can definitely see how that wouldn't work with the current update process.

If you want to stop the extension from automatically checking for gem updates, you can set solargraph.checkGemVersion to false in the VS Code settings.

matochondrion commented 1 year ago

Same for me. I get the error "Solargraph gem version 0.49.0 is available. (Current version: 0.44.3)".

I try running gem install solargraph on the command line and then check the version:

❯ solargraph -v
0.49.0

But I still get the warning when I start VS Code saying that I'm on version 0.44.3.

Then I use which to find where solargraph is installed: /Users/me/.gem/ruby/3.1.3/bin/solargraph Setting the command path to /Users/me/.gem/ruby/3.1.3/bin/solargraph in the settings results in "Failed to start Solargraph" when I restart VS Code.