rbenv
Manage multiple Ruby versions per project
TLDR
List installed versions
$ rbenv versions
List available versionscopy
$ rbenv install -l
Install Ruby versioncopy
$ rbenv install [3.2.0]
Set global versioncopy
$ rbenv global [3.2.0]
Set local versioncopy
$ rbenv local [3.2.0]
Show current versioncopy
$ rbenv version
Set shell-specific versioncopy
$ rbenv shell [3.2.0]
Rehash shimscopy
$ rbenv rehash
copy
SYNOPSIS
rbenv command [args...]
DESCRIPTION
rbenv manages multiple Ruby installations. It allows switching between Ruby versions globally, per-project, or per-shell, without modifying system Ruby.The tool uses shims to intercept Ruby commands and route them to the appropriate version based on context.
PARAMETERS
versions
List installed versions.version
Show current version.install version
Install Ruby version.uninstall version
Remove Ruby version.global version
Set global default.local version
Set directory version.shell version
Set shell version.rehash
Rebuild shims.which name
Show executable path.init
Set up rbenv shims in the current shell.exec command
Run an executable with the selected Ruby version.
CAVEATS
Requires ruby-build plugin for install. Shims need rehashing after gem installs. Per-project version via .ruby-version file.
HISTORY
rbenv was created by Sam Stephenson in 2011 as a simpler alternative to RVM. It focuses on doing one thing well - version switching - without modifying shells or managing gemsets.