Skip to the content
Know your tech before you buy it. Makers: get listed from $49/mo

chruby

github.com

  • Free plan
  • macOS
  • Linux
6.9 Club score Visit github.com

What chruby is

chruby is a free, MIT-licensed shell tool for changing the Ruby version selected in a session. Selecting a Ruby updates PATH and sets GEM_HOME and GEM_PATH for that installation. It can match installed Ruby versions fuzzily and uses the system Ruby when no other version is selected. Optional automatic switching checks the current directory and its parents for a .ruby-version file. chruby supports bash 3 or later and zsh on Linux and macOS. The project documents installation from a release tarball, Homebrew, Arch Linux AUR, Fedora Copr, and FreeBSD ports. Additional Ruby implementations can be installed with ruby-install or ruby-build for chruby to manage. Wiki guidance covers tools such as Capistrano, Chef, Cron, Emacs, Puppet, Vim, and Fish. Releases are PGP signed, and the README describes verification steps. The project is about 100 lines of code and includes tests.

Who it suits

chruby suits Ruby developers using Linux or macOS who want shell-based version selection and optional directory-based switching. It also fits teams pinning versions with .ruby-version files.

Good to know, and what to watch

  • Free, open-source MIT license
  • Updates PATH and Ruby gem variables
  • Fuzzy matching for installed Rubies
  • Optional .ruby-version auto-switching
  • Supports bash and zsh
  • Does not hook cd
  • No executable shims
  • Automatic switching is off by default

Free

Free

Open source

Getting started

  1. Open the chruby project website
  2. Install it from a release tarball, Homebrew, Arch Linux AUR, Fedora Copr, or FreeBSD ports
  3. Install additional Ruby implementations with ruby-install or ruby-build
  4. Use chruby in bash 3+ or zsh to select an installed Ruby
  5. Optionally enable directory-based switching with a .ruby-version file

Limits to check

chruby only changes versions already installed; additional Ruby implementations require ruby-install or ruby-build. Automatic switching is optional rather than enabled by default, and the tool does not provide executable shims.

The verdict

chruby provides focused Ruby version selection for bash and zsh. Its optional directory checks and documented integrations add flexibility, while users needing automatic behavior by default or executable shims should note its limits.

Questions people ask

Is chruby free?

Yes. The Free plan is free, and the project is MIT licensed and open source.

Which systems and shells does it support?

It supports Linux and macOS, with bash 3 or later and zsh shells.

Can it install Ruby versions?

The project documents using ruby-install or ruby-build to install additional Ruby implementations for chruby to manage.

Does it switch versions automatically?

Optional auto-switching checks the current and parent directories for a .ruby-version file, but automatic switching is not enabled by default.

What integrations are documented?

The project wiki links usage instructions for Capistrano, Chef, Cron, Emacs, Pow, Puppet, Sudo, Vim, and Fish.

What the maker publishes

Automatic switching
Optional auto-switching checks the current and parent directories for a .ruby-version file. source
Install options
The project documents installation from a release tarball, Homebrew, Arch Linux AUR, Fedora Copr, and FreeBSD ports. source
Integrations
The project wiki links usage instructions for Capistrano, Chef, Cron, Emacs, Pow, Puppet, Sudo, Vim, and Fish. source
License
The repository identifies its license as MIT. source
Limitations
chruby does not hook cd, install executable shims, or automatically switch Ruby versions by default. source
Path and gems
It updates PATH and sets GEM_HOME and GEM_PATH for the selected Ruby. source
Purpose
chruby changes the current Ruby version in a shell. source
Ruby installers
The README describes using ruby-install or ruby-build to install additional Ruby implementations for chruby to manage. source
Ruby support
It supports fuzzy matching of installed Rubies and defaults to the system Ruby. source
Security
The README says all releases are PGP signed and gives instructions to verify a release signature. source
Shell support
It supports bash 3 or later and zsh. source
Size and tests
The README describes chruby as about 100 lines of code and says it has tests. source

Checked against the maker's pages on 9 Oct 2026.