-
Notifications
You must be signed in to change notification settings - Fork 153
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
Client doesn't register dependency paths for version managers based on shims #2709
Comments
I'm testing the 0.8.6 vscode extension against my local setup where I had the issue and it still doesn't work. I have just updated the Ruby-lsp extension and re-opened the workspace in the devcontainers. I'm attaching a few screenshots. A complete fresh installation of rails devcontainers by using My concern is that you do a grep replace on the ruby path, but I think rbenv stores the bundler gems in exactly that path you are replacing, haven't tested the actual code, just by reading it. |
That is to correct only default gems, not bundled gems. Let's see if we can diagnose exactly what's going on, what do you get if you run this?
|
The ruby-lsp server runs in the container.
Are you able to reproduce it on your machine? Because it runs in a devcontainer I would expect that it will won't work on your machine as well. |
Thanks for sharing those paths. #2738 should fix it. |
Reported in #2701
When we configure the client, we use the environment's
GEM_PATH
to register the language server for handling dependency files, which allows users to enjoy all of our features even inside gems.However, that approach will not work properly for version managers based on shims, because those will not export a
GEM_PATH
when running the activation script.I believe that the solution is to return another field from the activation script for the gem paths (which can be printed with
Gem.path
). That value will exist even for version managers based on shims, so we can rely on that to register the client paths instead of using the environment variable.The text was updated successfully, but these errors were encountered: