New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fails to load #63
Comments
Did you get that error while using Bundler (i.e., |
Incidentally, if you're able to run |
I've tried all of the above with no luck (i.e. all possible option switches). Solargraph is listed in the Gemfile. AFAIK, the problem is the linkage against the system ruby, which should not happen. The terminal in VScode gives me the correct (RVM) ruby. $ bundle exec solargraph socket
Solargraph is listening PORT=7658 PID=38184 $ solargraph socket
Solargraph is listening PORT=7658 PID=38194 VScode term: $ which ruby
/Users/username/.rvm/rubies/ruby-2.5.1/bin/ruby
$ otool -L `which ruby`
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 1452.23.0)
/Users/username/.rvm/rubies/ruby-2.5.1/lib/libruby.2.5.dylib (compatibility version 2.5.0, current version 2.5.1)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)
/usr/local/opt/gmp/lib/libgmp.10.dylib (compatibility version 14.0.0, current version 14.2.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0) |
To follow up here;
|
Thanks for the details. I suspect this is an issue in the solargraph-utils library, which is responsible for selecting the appropriate shell to start the solargraph process. This is typically necessary, for example, in cases where the process explicitly needs to use One possibility: is VS Code running as a different user, such as I'll run some tests on MacOS and look for other possible root causes. |
One other possibility. Have you tried adding a .ruby-version file to the workspace root? |
It's running with my uid, not root. |
Okay, thanks. I still suspect the issue is with how solargraph-utils spawns the server process. I'll try to dig deeper on MacOS. |
I'm hitting this issue as well. If I wanted to try to fix it, where should I look? |
If I remove the |
Not only does this appear to be unnecessary, it also prevents ENV vars from being inherited. This is problematic especially in the case where RVM is being used. Fixes castwide/vscode-solargraph#63
A bit late, but just to follow up, I just confirmed that it does indeed work when removing '-l' from shell args in |
Solargraph fails to load with the following error on MacOS.
Using RVM latest, rvm is set to default gemset, ruby 2.5.1.
I have tried different approaches, including:
code .
afterrvm use 2.5.1 --default
Note that solargraph is working properly when launched with
solargraph socket
anywhere, including VSCode terminal, and that all libraries are installed in all gemsets and have been made pristine.Why is it using linked system libraries (Ruby.framework), when
otool -L
reports that the ruby in use is not linked to these? Is VSCode insisting on using system ruby, but local gems?Is it possible to have the plugin connect to a separately running instance of solargraph socket?
The text was updated successfully, but these errors were encountered: