castwide / vscode-solargraph

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

Solargrapgh gem not found Arch Linux #81

Closed pablox-cl closed 5 years ago

pablox-cl commented 6 years ago

I think this is closely related to #12 and #22.

Developers tools shows:

[Extension Host] zsh:1: command not found: solargraph
[Extension Host] Failed to start language server: "zsh:1: command not found: solargraph\n"`.

It actually works when code is running trough the terminal.

It ran fine trough the integrated terminal, and works if I put the full path to solargraph (in this case, trough a shim created with rbenv).

So, what is happening is that there's a problem recognizing the $PATH variable:

process.env.PATH
"/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl"

It seems that the plugin is starting a new zsh process that it's not reading the dotfiles where the $PATH is set (specially in .zshrc), but it's actually done when starting a new terminal. This is weird, because by default /usr/bin/zsh sets RCS and GLOBAL_RCS options are turned on.

How can I continue debugging this issue?

pablox-cl commented 6 years ago

I don't know if it's related, but solargraph it's not picking up the require directives of files in the gemfile.

castwide commented 5 years ago

Version 0.18.0 should fix this issue. It changes how the extension starts Ruby processes under zsh.