Mise Show archive.org snapshot is a tool that can manage your Ruby and Node.js versions. It replaces rbenv and nvm in that regard.
It installs precompiled Ruby binaries, so installing a new version will take seconds, not minutes.
Install mise
Follow the installation guidelines at https://mise.jdx.dev/getting-started.html.
Remove rbenv configuration
Search for rbenv config in .bashrc and .profile and remove it:
eval "$(rbenv init - bash)"
Search for rbenv config in .profile and remove it:
source /home/$user/.rbenvrc
Remove nvm configuration
Search for nvm config in .bashrc and remove it:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
Remove everyhing managed by rbenv (Ruby, gems)
Keep in mind you will have to reinstall Ruby+Gems.
rm -rf ~/.rbenv
Remove everyhing managed by nvm (NodeJS, global npm packages)
Keep in mind you will have to reinstall NodeJS versions and npm packages:
rm -rf ~/.nvm
Add mise configuration
Add the following configuration to ~/.config/mise/config.toml
[settings]
idiomatic_version_file_enable_tools = ["ruby", "node"]
[tools]
ruby = "latest"
"gem:geordi" = "latest"
"gem:geordi" = "latest" will automatically install the latest version of
geordi
Show archive.org snapshot
, after ruby has been installed. In this way, you can also add further gems you want to install by default. But be aware, that this does not check compatibility of the latest gem version with the ruby version. If your projects ruby version is incompatible, you will get an error message.
Manage ruby and node with mise
When installing ruby and node with mise, make sure to use mise install (not mise use). mise use will add a mise.toml to your project, which is unnecessary with the config above. With the setting idiomatic_version_file_enable_tools = ["ruby", "node"] your ruby and node versions will still be pinned in .ruby-version and .nvmrc respectively.