11

I have the following error in my VS Code:

[Error - 3:51:12 PM] Starting client failed
/usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': can't find gem solargraph (>= 0.a) with executable solargraph (Gem::GemNotFoundException)
    from /usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path'
    from /usr/local/bin/solargraph:23:in `<main>'

I currently use rbenv and have as global and only Ruby version 2.6.3 What seems to be the problem here? why do I see a ruby/2.6.0/ above if the version is 2.6.3?

Thanks for the help!

2
  • I'm having a similar problem - were you able to get to the bottom of this? May 4, 2019 at 19:13
  • nope, nothing :(
    – noloman
    May 4, 2019 at 20:17

5 Answers 5

12

If all else fails, you can try setting solargraph.commandPath to the executable's absolute path. Running which solargraph should give you the path to use.

3
  • Where/how do you set it? some context be great May 12, 2019 at 15:10
  • 7
    solargraph.commandPath is a configuration option in VS Code. On Mac, it's in the menu under Code -> Preferences -> Settings.
    – castwide
    May 12, 2019 at 16:13
  • @castwide why don't you update your answer with this information?
    – Ramon Dias
    Nov 18, 2022 at 13:19
5

I found the solution you should gem install solargraph. If not work and get this error

ERROR: Loading command: install (ArgumentError) unknown encoding name - CP720 ERROR: While executing gem ... (NoMethodError) undefined method "invoke_with_build_args" for nil:NilClass

Try to execute by administrator in CMD

chcp 1252

Then try to install gem again

Enjoy!

0

Try executing solargraph -v from the VS Code terminal.
If that gives an error try gem install bundler:1.17.3

0

I was getting errors with every keystroke similar to:

[Error - 6:08:49 PM] Request textDocument/completion failed.
  Message: [ArgumentError] wrong number of arguments (given 1, expected 0)
  Code: -32603 

I'm using VSCodium, I changed a configuration in order to install "official" extensions. I re-installed all extensions, including Solargraph, that's when this started happening. In the end, restarting editor via Developer: Reload Window fixed it.

0

I had to install benchmark which it seems is a dependency:

gem install benchmark

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.