castwide / solargraph

A Ruby language server.
https://solargraph.org
MIT License
1.87k stars 154 forks source link

Issue running v0.48 #624

Open Buzzkill-McSquare opened 1 year ago

Buzzkill-McSquare commented 1 year ago

Version Manager: rvm v1.29.12 Ruby v3.1.3

I've been running solargraph v0.47.2 in Ubuntu without any problems. I was prompted to upgrade by the VSCode extension to v0.48. Once I did, solargraph stopped working. Any command I try gives this error:

/home/ryan/.rvm/gems/ruby-3.1.3/bin/solargraph: 6: exec: /home/ryan/.rvm/gems/ruby-3.1.3/bin/ruby: not found

I'm not entirely sure if this is an issue with the gem's code, but it seems like it's trying to find the ruby executable from the gems directory. I don't know how to change this.

If I run gem install solargraph then it seems to switch back to using v0.47.2, even though both versions are still installed.

castwide commented 1 year ago

Could this be due to a version limitation in your Gemfile or gemspec? Depending on your configuration, VS Code might be looking for a version of Solargraph that your bundle doesn't allow, or some similar discrepancy.

Buzzkill-McSquare commented 1 year ago

I've got solargraph installed globally, it's not bundled in my project. Could that be the issue? The extension isn't configured to use bundler, and I gave it the absolute path to the executable.

castwide commented 1 year ago

Using bundler is one possible solution, but might not be necessary.

Does your project have a .ruby-version file that specifies a version other than 3.1.3?

Buzzkill-McSquare commented 1 year ago

My .ruby-version file has ruby-3.1.3.

I uninstalled v0.48.0 and solargraph works again with the default settings, I just ignore the prompt to update to v0.48. I will continue to investigate, though, and let you know if I find anything.

castwide commented 1 year ago

I'm sorry v0.48.0 isn't working correctly. If you come across a possible root cause, please let me know.