LinuxCommandLibrary

rbenv

rbenv

TLDR

Install a Ruby version

$ rbenv install [version]
copy


Display a list of the latest stable versions for each Ruby
$ rbenv install --list
copy


Display a list of installed Ruby versions
$ rbenv versions
copy


Use a specific Ruby version across the whole system
$ rbenv global [version]
copy


Use a specific Ruby version for an application/project directory
$ rbenv local [version]
copy


Display the currently selected Ruby version
$ rbenv version
copy


Uninstall a Ruby version
$ rbenv uninstall [version]
copy


Display all Ruby versions that contain the specified executable
$ rbenv whence [executable]
copy

USAGE

Initialize rbenv for your acccount:

$ rbenv init $ echo eval "$(rbenv init -)" >> ~/.bashrc # restart your shell after this

Install different Ruby interpreters (requires the ruby-build package):

$ rbenv install 2.4.0

Switch between different Ruby interpreters:

$ rbenv global 2.4.0 $ ruby -v ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux] $ rbenv global system $ ruby -v ruby [whatever version of Ruby Debian provides by default]

The original rbenv README with a more comprehensive documentation, including all of the available commands, is available at /usr/share/doc/rbenv/README.md.gz

ABOUT

This manual page was written for the Debian system by Antonio Terceiro <terceiro@debian.org> and may be used by others.

Copied to clipboard