mise: Installation, usage and migration from rbenv/nvm

Updated . Posted . Visible to the public.

Mise Show archive.org snapshot manages Ruby, Node.js and pnpm versions. It replaces tools like rbenv and nvm.

Mise can install precompiled Ruby binaries, making Ruby installations much faster.

Installing mise

Follow the official mise installation guide Show archive.org snapshot . In particular:

  1. Install mise Show archive.org snapshot
  2. Activate mise Show archive.org snapshot in your shell, so it automatically selects versions when you change directories.

Verify the installation:

mise -v

Configure version files

We want to keep using .ruby-version and .nvmrc in our projects, rather than introducing mise.toml files.

Add the following to ~/.config/mise/config.toml (create the file if necessary):

[settings]
idiomatic_version_file_enable_tools = ["ruby", "node", "pnpm"]

[tools]
ruby = "latest"

This configures mise to recognize our existing version files and use the latest Ruby when no project-specific version is configured.

Migrating from rbenv and nvm (optional)

Only follow this section if you previously used rbenv or nvm. If you're setting up a new machine, skip ahead to the next section.

Removing old shell configuration

Search for rbenv and nvm in your ~/.bashrc and ~/.profile (or other shell startup files). Remove the lines that initialize these tools.

They might look like this:

eval "$(rbenv init - bash)"

source /home/$user/.rbenvrc

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"

Your configuration may look slightly different.

Removing old Ruby and Node versions

rbenv and nvm store installed runtime versions in your home directory. Once you no longer need these installations, you can remove them:

rm -rf ~/.rbenv
rm -rf ~/.nvm

Warning

These commands permanently remove the installed versions, including their global gems and npm packages. You will need to reinstall anything you still use.

You do not need to remove the .ruby-version and .nvmrc files from your projects. Mise will continue using them.

Using mise

If you just installed or migrated to mise, close and re-open your terminal windows so your new shell settings are active.

When you cd into a project folder, mise automatically selects the configured Ruby, Node.js and pnpm versions.

If a required version is not installed yet, mise will warn you:

$ cd my-project
mise WARN  missing: ruby@3.4.4 node@22.15.1

Install the missing versions with:

mise install

Mise can also automatically install missing versions when you first try to use them, for example by running ruby or node.

Tip

Do not use mise use to install versions. That command would create or modify a mise.toml file in your project. Use mise install instead.

Profile picture of Thomas Eisenbarth
Thomas Eisenbarth
Last edit
Henning Koch
Keywords
migrate, shell
License
Source code in this card is licensed under the MIT License.
Posted by Thomas Eisenbarth to makandra dev (2025-11-11 09:15)