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
VSCode extension + chruby custom paths via RUBIES = cannot find installation directory for Ruby #1969
Comments
I have the same issue, but haven't set |
The latest version exposes the setting to configure |
@vinistock, I tested the latest, and noticed that the behavior of the new config doesn't exactly match the description provided, since:
But I needed to set the following in my "chrubyRubies": ["/opt/homebrew/Cellar/ruby","/opt/homebrew/Cellar/ruby@3.2"] After adjusting that, it seems like an improvement, but it's now generating a different set of errors:
|
Interesting. Maybe the rubies installed via Homebrew have a different gem home than what I expect. Can you share what does |
3.3.1
It seems prism was already installed on 3.3.1. With 3.2.4
However, my Ruby 3.2.4 project still throws errors when opening in VSCode. Here's a gist of the ruby-lsp Output tab from VSCode. |
@vinistock realizing perhaps this doesn't notify you since the issue is closed. @ing you just in case... |
It does actually, unless I explicitly unsubscribe. I'm not sure what's going on for the older Ruby. It's breaking when running I assume you can successfully run bundle install in your terminal, so I wonder if we're not finding the wrong Bundler executable. If you run |
You're correct that there was something wrong with my Ruby 3.2.4 bundler setup. After resolving that, everything seems to be working as expected with ruby-lsp. I suppose it's just the gem home issue outstanding at this point. Thanks so much for your help! 🚀 |
Sorry, which gem home problem? And my pleasure, thanks for reporting it! |
You previously said:
and I provided those in the comment above |
Oh, I see what you mean. Yeah, it doesn't seem like there are any issues there. Looking at the output you shared, we did find the correct gem home and gem path. So all should be good 👍. |
If that's the case, then why did auto installation of the gem fail? It only worked after I manually installed it globally |
Description
Reproduction steps
The only output that I see in the VSCode output tab for Ruby LSP is:
I don't see an activation command that I can attempt to replicate, as suggested in the troubleshooting steps, but running
chruby 3.3.1
in the VSCode terminal works without error.Versions / Environment
Ruby LSP: Update language server gem
commandVSCode settings.json
.ruby-version file contents:
A perhaps unique aspect of my setup is that I install rubies via Homebrew, and make them available in chruby by setting the
RUBIES
env var in my.zprofile
. This seems to be picked up properly by VSCode, regardless of whether it's launched from the dock icon or a terminal command.Another bug?
As an aside, this extension produces a confusing/inaccurate error message if using a .ruby-version file that doesn't specify a patch version, even though that should be acceptable for
chruby
, ex:The error shown is:
The text was updated successfully, but these errors were encountered: