vscode-solargraph icon indicating copy to clipboard operation
vscode-solargraph copied to clipboard

Solargraph fails starting on VSCode with WSL2 - Ubuntu environment

Open KozyWorks opened this issue 5 years ago • 4 comments

Hi @castwide,

I am very new to WSL and Ubuntu environment as well as solargraph system.

At first I had an issue with solargraph's command path, but seems like it is solved by setting path to the following:

"solargraph.commandPath": "K:/home/meme/.rvm/gems/ruby-2.6.3/gems/solargraph-0.35.0/bin/solargraph"

where K: is a mapped drive for \\wsl$.

Now I am having another issue with the following error message.

[Error - 11:38:59 PM] Starting client failed 'ruby' is not recognized as an internal or external command, operable program or batch file.

Cap 2019-07-23 23-48-33-429

Could I ask some clarification on what that error message means, what is going wrong and how I could solve this error?

Thank you in advance!

KozyWorks avatar Jul 23 '19 13:07 KozyWorks

This issue might help you get Solargraph working with WSL: https://github.com/castwide/vscode-solargraph/issues/80

castwide avatar Jul 28 '19 00:07 castwide

Hi @castwide,

So, I managed the solargraph to work on both:

  • WSL2 - Ubuntu environment with RVM
  • Windows environment with Ruby Installer

Where I'm using VS Code Remote Development extension for WSL2.

However, I still don't get how pablox-cl managed to run WSL side's solargraph on Windows Command Prompt.

When I run either of

C:\Users\JHK>bash -c '~/.rvm/gems/ruby-2.6.3/bin/solargraph -v'

or

C:\Users\JHK>wsl ~/.rvm/gems/ruby-2.6.3/bin/solargraph -v

I get an error saying

/usr/bin/env: ‘ruby_executable_hooks’: No such file or directory

Arrrrrg....

This is driving me nuts :s

I guess it's an issue even before the cross spawn thingy that he mentions on his reply.

KozyWorks avatar Jul 28 '19 13:07 KozyWorks

The latest version of the extension supports remote development, including over WSL. More information: https://code.visualstudio.com/docs/remote/wsl

castwide avatar Aug 15 '19 19:08 castwide

Try installing solargraph on ubuntu (wsl2) gem install solargraph

malibeg avatar Oct 15 '19 09:10 malibeg