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 railsreload 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.
-
No app left behind: Upgrade your application to Ruby 3.0 and s...
-
A look forward from 2020
-
Testing Rails applications on real mobile devices (both design...
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.