tl;dr
asdf
allows you to manage multiple runtime versions with a single CLI tool and is backwards compatible by supporting existing config files, like e.g..nvmrc
or.ruby-version
.
source /home/$user/.rbenvrc
in ~/.profile
eval "$(rbenv init -)" in
~/.bashrcor
~/.zshrc`Depending on how you installed rbenv, the way of disabling rbenv will vary.
To add support of version files of other version managers, add the following configuration option to ~/.asdfrc
:
legacy_version_file: yes
For a smooth experience with RubyMine you need to configure asdf in your project settings:
RBENV | ASDF | Description |
---|---|---|
rbenv local | asdf current ruby | Show the local application-specific Ruby version |
rbenv local <version> | asdf local ruby <version> | Set the local application-specific Ruby version |
rbenv global | asdf current ruby | Show the global Ruby version |
rbenv global <version> | asdf global ruby <version> | Set the global Ruby version |
rbenv shell | asdf current ruby | Show the shell-specific Ruby version |
rbenv shell <version> | asdf shell ruby <version> | Set the shell-specific Ruby version |
rbenv install <version> | asdf install ruby <version> | Install a Ruby version using ruby-build |
rbenv install -l | asdf list all ruby | List all installable ruby versions |
rbenv uninstall | asdf uninstall ruby <version> | Uninstall a specific Ruby version |
rbenv rehash | asdf reshim ruby | Rehash rbenv shims |
rbenv version | asdf current ruby | Show the current Ruby version and its origin |
rbenv versions | asdf list ruby | List installed Ruby versions |
rbenv which ruby | asdf where ruby | Display the full path to an executable |
.ruby-version
, etc.).tools-version
Add the asdf-alias Show archive.org snapshot plugin to asdf to get support for managing aliases for your installed versions of ruby, node, etc. Aliases are a neat way of avoiding to install minor versions of your asdf managed tools.
To automatically set alias every time you install a new version of a tool, add the following line to your ~/.asdfrc
:
post_asdf_install_ruby = asdf alias ruby --auto