Command Line

List all Ruby versions available with rbenv

rbenv install -l

$ rbenv install -l
Available versions:
  1.8.5-p52
  1.8.5-p113
  1.8.5-p114
  1.8.5-p115
  1.8.5-p231
[...]
  truffleruby-1.0.0-rc8
  truffleruby-1.0.0-rc9

Install Ruby with rbenv

rbenv install _version_

$ rbenv install 2.5.1
ruby-build: use openssl from homebrew
Downloading ruby-2.5.1.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.1.tar.bz2
Installing ruby-2.5.1...
ruby-build: use readline from homebrew
Installed ruby-2.5.1 to /Users/user/.rbenv/versions/2.5.1

Uninstall Ruby version with rbenv

rbenv uninstall _version_

References

rbenv project page

$ rbenv uninstall 2.4.0
rbenv: remove /Users/user/.rbenv/versions/2.4.0? [yN] y

List all installed Ruby versions with rbenv

rbenv versions

$ rbenv versions
  system
  2.0.0-p648
  2.2.3
  2.4.1
  2.5.0
* 2.5.1 (set by /Users/user/projects/project-1/.ruby-version)
  2.6.3

View current Ruby version with rbenv

rbenv version

$ rbenv version
2.5.1 (set by /Users/user/projects/project-1/.ruby-version)

Reference

rbenv github project