ruby rbenv

abstract

rbenv and ruby-build are shell scripts which install and manage Ruby versions.

basics

commands

setup
brew install rbenv install rbenv with Homebrew
brew uninstall rbenv uninstall rbenv with Homebrew
brew upgrade rbenv ruby-build upgrade rbenv with Homebrew
eval "$(rbenv init -)" modify shell to use rbenv
usage
rbenv install 2.6.3 install Ruby version 2.6.3
rbenv install --list show available Rubies
rbenv shell 2.6.3 use Ruby version 2.6.3
rbenv shell --unset revert to using default Ruby
rbenv uninstall 2.6.3 remove Ruby version 2.6.3
rbenv versions show installed Rubies

dependencies

examples

Set local Ruby for a project:

cd path/to/myproject
echo '2.6.3' > .ruby-version
rbenv install --skip-existing 2.6.3

See Installing Ruby versions for details.

faq

Where are the official docs?
rbenv installation
rbenv commands
rbenv explanation
Email GitHub LinkedIn
return
© Sam Kennerly 2023. Licensed under a CC BY 4.0 license.
Built by a Quarto
with icons by Simple Icons.
samkennerly@gmail.com