Open phroph opened 2 years ago
I have the same issue. Using macOS 11.6.5.
VSCode
Version: 1.66.2
Commit: dfd34e8260c270da74b5c2d86d61aee4b6d56977
Date: 2022-04-11T07:49:20.994Z
Electron: 17.2.0
Chromium: 98.0.4758.109
Node.js: 16.13.0
V8: 9.8.177.11-electron.0
OS: Darwin x64 20.6.0
Ruby setup
ruby 3.2.0preview1 (2022-04-03 master f801386f0c) [x86_64-darwin20]
solargraph 0.44.3
.ruby-version ruby-3.2.0
It's now working and the solution is to use "wrappers
".
VSCode settings.json
:
"solargraph.transport": "stdio",
"solargraph.formatting": true,
"solargraph.diagnostics": true,
"solargraph.commandPath": "/Users/alan/.rvm/wrappers/default/solargraph",
Nice find! I'll give that a shot when I have a chance and see if that resolves my issue. I had bit the bullet and was using RubyMine in the short-term, rather than fiddle with this too much.
Huge thanks @alanwilter! I've spend more than an hour trying to wrap my head around it...
I have what seems like a regression of an older bug when using RVM: https://github.com/castwide/vscode-solargraph/issues/63
I can see that in all terminals, windows (including VS term), ruby is properly set to 2.7.5, and solargraph is working.
I've tried:
solargraph socket
runs successfullycode .
rvm use 2.7.5 --default
before aboveI have (according to VS terminal):
0.44.3
ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-darwin21]
/Users/phuff/.rvm/rubies/ruby-2.7.5/bin/ruby
I just get a message along the lines of (without using bundler)
Clearly it's hitting the correct solargraph executable and then immediately using the Ruby.framework 2.6 activate_bin_path. My workspace also has
.ruby-version
which is correctly set to 2.7.5.Not sure where to go from here because the linked original ticket involves making a change to a utils file in node_modules, but I don't see that anymore (also it's been more than 3 years since that ticket).