Upgrade rbenv and ruby-build

Written on July 29, 2016

On my systems, I use rbenv to manage different versions of Ruby on my machine.

This is becasue different Rails projects that I’m working on require different versions of Ruby on my system. Using rbenv allows me to have multiple versions and different sets of gems installed for each project.

This is just a quick post on how to upgrade rbenv and it’s plugin ruby-build. These instructions assume that rbenv and ruby-build were installed using the git clone method.

# 1. cd into ~/.rbenv
$ cd ~/.rbenv
# 2. Pull latest from repo
$ git pull
# 3. cd into ~/.rbenv/plugins/ruby-build
$ cd ~/.rbenv/plugins/ruby-build
# 4. Pull latest from repo
$ git pull

Once you’ve run the four steps above, you should have the latest version of rbenv and ruby-build. Now you can compile and build the latest versions of Ruby, which are available to you at rbenv install -l.

Stay in touch

Thanks for reading this article. I'd love to stay in touch and share more tips on programming and side projects with you. Sign up and I'll send you my articles straight to your email, you'll also get a free copy of the light themed version of my Git cheat sheet.
Git cheat sheet preview image