-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Allow disabling rbenv and rvm in Ruby containers #704
Comments
These were not in the containers originally in the containers, but developers requested them be added so they can take advantage of the related config files. So, removing them is not ideal. That said, we can, however, "eat" these messages and prevent them from appearing or allow disabling them as you mention. |
This ENV based to disable rbenv / rvm based on an environment variable would also apply to the codespaces-linux image. |
This is also causing issues with the Ruby VS Code extension for me, which seems to detect rbenv/rvm being present and tries to load Ruby through them (instead of using the container's system Ruby): I'm moving towards using leaner custom devcontainer |
I had the same issue and solved it by adding |
I've just rebuilt my container today and it's now forcing me to use rvm. Any attempt at bundling puts things into /usr/local/rvm/* - the above workaround no longer appears to work. |
//cc @samruddhikhandale Is this potentially related to the migration to https://github.com/devcontainers/features and https://github.com/devcontainers/images ? |
Yes, looks related to the migration. We are now setting
@simmerz Could you try unsetting |
Unfortunately, unsetting That's if I add a line like If I |
This leaves the RVM install in an inconsistent state though. A simple
|
I'm not using devcontainers, but I wound up here after googling ways to temporarily disable After finding nothing, I traced through the rvm source code, and discovered a possible solution to trick rvm:
This works because rvm uses this environment variable to prevent nesting/recursion when setting up your environment. Anyways, hope this helps others looking for ways to disable rvm. |
Hello, I just started using dev-containers and I noticed that |
I've found a workaround is to add |
The "workaround" that I came up with was to build out a local feature that installs just |
ruby
,ruby-rails
Steps to Reproduce:
ruby-rails
development container definitioncd
into the workspace directory (e.g.cd .
orcd /workspace
from a new Integrated Terminal)rvm
complains about the Ruby version specified in theGemfile
isn't installed, even though the development container specifically has (the correct version of) Ruby installed (see Disable RVM nag warning about a Ruby version not being installed #690).Why are
rbenv
andrvm
installed on Ruby development containers? We can already select the version of Ruby we want installed by using a particular Docker image tag, so there's no need for a Ruby version manager; they generate unnecessary noise and are difficult to remove from the pre-built containers. At the very least, there should be a mechanism to conditionally prevent loading thervm
andrbenv
initialization scripts using an environment variable.The text was updated successfully, but these errors were encountered: