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
Unable to activate vscode ruby lsp extension due to failing to globally gem install ruby lsp and other gems #1882
Comments
Thank you for the bug report! Rubygems already provides an option to choose where gems installed via If you specify the install directory in your
If that works, then I don't believe we should add any extra settings for the VS Code extension. Better to reuse rubygems own configuration and have consistency between the extension and what happens on the terminal. Although, it would be great to document this since the question has come up more than once. |
So I'm guessing that the vscode extension will either use gem install or somehow listen to configurations set for rubygems, such as setting the install-dir. I'm also guessing that the gems don't have to installed in specific ways related to where ruby is installed. I have to rework my dockerfile, it's a good opportunity. I think in terms of documentation, you can definitely mention that if you don't have write permission in some way (like using docker), you would either have to globally install those 3 gems before (with elevated permissions or when you would have elevated permissions, like in dockerfile)... |
We run If you have
This doesn't quite solve the full story. We also auto-update the global installation, so that we can always use the latest executable, which would fail if you just installed them manually. I believe that, at the core of the issue, is the fact that most people configure their If the idea is to have all gems installed in a given directory that isn't the default, then I do believe the right solution is to configure both Bundler and rubygems to install everything in that directory. If you give this a try, please let us know if it worked properly. We may discover that we still need a couple of tweaks to the VS Code extension to make it work, but we do want to support this use case. |
Okay, so I ended up not going that route with gemrc... I believe the syntax is something like I was trying to get it to work, but I gave up after a little bit. Yall can try it. I believe a documented working approach involving gemrc would be very great! Something sorta unrelated fixed the issue. |
Description
Reproduction steps
System Combination:
platform: Mac OS
IDE: VScode
Ruby version: 3.3.0
ruby version control: none in the docker container
docker user permission: does not have global write permission
Other vscode extensions: dev containers
BUNDLE_PATH: project's vendor/bundle
Steps:
Current work around:
Desired Behavior:
The text was updated successfully, but these errors were encountered: