asdf-ruby
asdf-ruby copied to clipboard
Changing ruby version with RUBY_VERSION
Coming from other version managers, one thing I'm missing is being able to use RUBY_VERSION
in the environment to set it. I'm not sure if this is a general asdf problem, or one with this plugin.
For example:
❯ ruby --version
ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [arm64-darwin21]
❯ RUBY_VERSION=3.0.2 ruby --version
ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [arm64-darwin21]
I think at the least, it's worth mentioning in the "Migrating from another Ruby version manager" section.
I have been looking for quite a while to find ASDF_RUBY_VERSION
works for this. Still, having compatibility with other tools would be nice.
asdf shell ruby <version>
setting ASDF_RUBY_VERSION
is the closest thing that we are going to support. The version resolution process is handled by asdf core and the ASDF_
prefix env variables are the only ones it reads during the version resolution.