RBENV: Quick Tutorial

In this tutorial, I will consider you are using OSX, so Homebrew!

Open the terminal and execute:

brew install rbenv


brew install ruby-build

Edit the file:


At the end append the following line:

eval "$(rbenv init -)"

Save and close the file. Load the new configuration. To do it, execute the command:

source ~/.bash_profile

Afterward, go to the site Ruby and download the newest stable version. For this tutorial, I used the version 2.1.2. In the terminal window execute:

rbenv install 2.1.2


rbenv rehash 

To switch between Rubi versions using RBENV, just type:

rbenv global [versão]

Using global there are other options; take a look at the documentation. So:

rbenv global 2.1.2

Checking the current version:

ruby -v

List all available versions:

rbenv versions

Now you can manage which will be the main version and switch between the options using RBENV. Don’t forget to execute:

rbenv rehash

After installing a new Ruby version or a new Gem in any environment.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s