Rbenv Cheat Sheet

List available rubies

Check which ruby versions are available in rbenv. You can find ruby, jruby, maglev, rubinius etc.
rbenv install -l

Install a ruby version

You can install a specific ruby version with:
rbenv install 2.1.2
Run rehash after install/uninstall rubies
rbenv rehash

List your ruby versions

List all ruby versions installed in your machine
rbenv versions

Current ruby version

Wondering if/which ruby version is currently used?
rbenv version

Use this ruby in the current directory

Choose a version for your current directory
rbenv local 2.1.2

All gemset

Apart from ruby versions you have sets of gems called gemsets. Gemsets are organized and managed by bundler. To list all your gemsets run:
rbenv gemset list

Create gemset

When creating a new gemset you need to define the ruby version associated with the gemset and give gemset a name.
rbenv-gemset create

Current gemset

Check which gemset is used in your current directory.
rbenv gemset active

Delete gemset

Delete gemset for specific ruby version.
rbenv gemset delete

comments powered by Disqus