chruby
github.com
What it is
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.
Spec sheet
- Purpose
- chruby changes the current Ruby version in a shell.Read 9 Oct 2026 · github.com
- Integrations
- The project wiki links usage instructions for Capistrano, Chef, Cron, Emacs, Pow, Puppet, Sudo, Vim, and Fish.Read 9 Oct 2026 · github.com
- Security
- The README says all releases are PGP signed and gives instructions to verify a release signature.Read 9 Oct 2026 · github.com
- License
- The repository identifies its license as MIT.Read 9 Oct 2026 · github.com
- Automatic switching
- Optional auto-switching checks the current and parent directories for a .ruby-version file.Read 9 Oct 2026 · github.com
- Install options
- The project documents installation from a release tarball, Homebrew, Arch Linux AUR, Fedora Copr, and FreeBSD ports.Read 9 Oct 2026 · github.com
- Limitations
- chruby does not hook cd, install executable shims, or automatically switch Ruby versions by default.Read 9 Oct 2026 · github.com
- Path and gems
- It updates PATH and sets GEM_HOME and GEM_PATH for the selected Ruby.Read 9 Oct 2026 · github.com
- Ruby installers
- The README describes using ruby-install or ruby-build to install additional Ruby implementations for chruby to manage.Read 9 Oct 2026 · github.com
- Ruby support
- It supports fuzzy matching of installed Rubies and defaults to the system Ruby.Read 9 Oct 2026 · github.com
- Shell support
- It supports bash 3 or later and zsh.Read 9 Oct 2026 · github.com
- Size and tests
- The README describes chruby as about 100 lines of code and says it has tests.Read 9 Oct 2026 · github.com
Plans and prices
Strong points and limits
Strong points
- Free and MIT licensed
- Updates PATH and Ruby gem variables
- Supports bash and zsh
- Optional .ruby-version switching
- Install options cover several systems
Limits
- Does not hook the cd command
- Does not install executable shims
- Automatic switching is off by default
Who it suits
It suits Ruby developers who want shell-based version selection on Linux or macOS. It is also useful when project files should optionally control the selected Ruby.
Verdict
chruby keeps Ruby selection focused on shell environment changes, with optional directory-based switching and support for common installation routes. Buyers should account for its lack of cd hooks and shims, and enable automatic switching when needed.
Where Specifiction places it
- Runtime Version Managers#7 of 307.9
- Development Environment Managers#17 of 507.9