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.