chruby vs nvm
chruby
github.comnvm
github.comSide by side
| Figure | chruby | nvm |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | Yes |
| Windows | — | Yes |
| macOS | Yes | Yes |
| Linux | Yes | Yes |
| Self-hosted | — | Yes |
| Plans published | 1 | 2 |
| Spec score · Runtime Version Managers | 7.9 (#7) | 8.5 (#4) |
| Spec score · Development Environment Managers | 7.9 (#17) | 8.4 (#10) |
| Automatic switching | Optional auto-switching checks the current and parent directories for a .ruby-version file. | Automatic directory switching is documented as user-added bash or zsh hooks rather than built into the core command. |
| Integrations | The project wiki links usage instructions for Capistrano, Chef, Cron, Emacs, Pow, Puppet, Sudo, Vim, and Fish. | Documented integrations include Docker, Ansible, zsh plugins, bash completion and optional nvshim shims. |
| License | The repository identifies its license as MIT. | nvm is distributed under the MIT License, permitting use, modification, distribution and sale subject to retaining notices. |
| Purpose | chruby changes the current Ruby version in a shell. | nvm lets users install and use different Node.js versions from the command line. |
| Security | The README says all releases are PGP signed and gives instructions to verify a release signature. | The GitHub repository links to a security policy, but the README does not state a security certification or compliance standard. |
| Shell support | It supports bash 3 or later and zsh. | It works on POSIX-compliant shells including sh, dash, ksh, zsh, and bash. |
Plans
In their own words
chruby
chruby is a free, MIT-licensed shell utility for changing the Ruby version used in a session. Selecting a Ruby updates PATH and sets GEM_HOME and GEM_PATH for that installation. It can match installed Ruby names fuzzily and uses the system Ruby when no selection is made. Optional automatic switching checks the current and parent directories for a .ruby-version file. chruby supports bash 3 or later and zsh on Linux and macOS. Installation instructions cover a release tarball, Homebrew, Arch Linux AUR, Fedora Copr, and FreeBSD ports. Additional Ruby implementations can be installed with ruby-install or ruby-build. The project provides guidance for integrations including Capistrano, Chef, Cron, Emacs, Pow, Puppet, Sudo, Vim, and Fish. Releases are PGP signed, with verification instructions, and the codebase is described as about 100 lines with tests.
nvm
nvm is a free, MIT-licensed command-line tool for installing and managing Node.js versions. It is designed for installation per user and invocation per shell, and works in POSIX-compliant shells including sh, dash, ksh, zsh, and bash. Users can install specific versions, switch between them, set aliases such as a default, and use LTS aliases and commands to select long-term support versions. A project can specify its Node.js version in an.nvmrc file; documented shell snippets can support automatic switching. During installation, nvm can reinstall global npm packages from another installed Node.js version. With the --offline flag, it can install a version that was previously downloaded or cached without network access. The project documents use in Docker, including an example for CI/CD jobs. On Windows, nvm can work through WSL and may work with Git Bash or Cygwin depending on the environment. Fish shell is not supported, and the project points users to community alternatives. The project states that only the latest nvm version is supported.