Skip to content
By Ben Wiseley

Moving from RVM to RBENV

Moving from RVM to RBENV is pretty straightforward but here are some gotcha's I ran into migrating my two system.

First: rvm implode

rvm implode

At least on my system I saw a bunch of permission errors while this was running. Solve this by manually destroying .rvm after rvm implode finishes.

Second: clean up left overs

sudo rm -rf ~/.rvm
sudo rm -rf ~/.rvmrc
sudo rm -rf /etc/rvmrc

Third: remove gems

I wanted to make sure I didn't have anything kicking around from the old version so I removed all the gems.

sudo gem list | cut -d" " -f1 | xargs sudo gem uninstall -aIx

For older gem versions you might need to loose the lx options and run more than once

sudo gem list | cut -d" " -f1 | xargs sudo gem uninstall -a

Fourth: install RBENV

On my system ~/.profile is my bash profile. This might be different on your system. Do a ls -la and look for .profile, .bashprofile, .bashrc - something like that.

cd
git clone git://github.com/sstephenson/rbenv.git .rbenv

Then add this to the bottom of your ~/.profile

export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"

Quit and restart terminal

Fifth: install ruby-build and add you rubies

git clone git://github.com/sstephenson/ruby-build.git
cd ruby-build
./install.sh

Install a ruby version and set it to be the default

rbenv install 1.9.3-p0
rbenv local 1.9.3-p0
rbenv rehash

Now's a good time to also update your ruby-gem to the latest

sudo gem update --system

Check to make sure you're actually using rbenv

> which ruby
/Users/wiseleyb/.rbenv/shims/ruby
> which irb
/Users/wiseleyb/.rbenv/shims/irb
> which rails
/Users/wiseleyb/.rbenv/shims/rails

If things aren't pointing where you expect try removing the /usr/bin/whatever that's misbehaving. Reinstalling. Restarting terminal. Rechecking. This at least worked for problems I had with rails. Which I solved by:

sudo rm /usr/bin/rails
sudo gem install rails

reload bash

. ~/.profile

Latest Articles by Our Team

Our expert team of designers and developers love what the do and enjoy sharing their knowledge with the world.

We Hire Only the Best

reinteractive is Australia’s largest dedicated Ruby on Rails development company. We don’t cut corners and we know what we are doing.

We are an organisation made up of amazing individuals and we take pride in our team. We are 100% remote work enabling us to choose the best talent no matter which part of the country they live in. reinteractive is dedicated to making it a great place for any developer to work.

Free Community Workshops

We created the Ruby on Rails InstallFest and Ruby on Rails Development Hub to help introduce new people to software development and to help existing developers hone their skills. These workshops provide invaluable mentorship to train developers, addressing key skills shortages in the industry. Software development is a great career choice for all ages and these events help you get started and skilled up.

  • Webinars

    Webinars

    Webinars are our online portal for tips, tricks and lessons learned in everything we do. Make the most of this free resource to help you become a better developer.

    Learn more about webinars

  • Installfest

    Installfest

    The Ruby on Rails Installfest includes a full setup of your development environment and step-by-step instructions on how to build your first app hosted on Heroku. Over 1,800 attendees to date and counting.

    Learn more about Installfest

  • Development Hub

    Development Hub

    The Ruby on Rails Development Hub is a monthly event where you will get the chance to spend time with our team and others in the community to improve and hone your Ruby on Rails skills.

    Learn more about Development Hub

Get the “reinteractive Review” Monthly Email