RVM Is a Must for the Rubyist
If you are a Ruby or Rails developer and you haven't heard of RVM yet, I'll let you in on the secret. It rocks! Basically, RVM allows you to easily simultaneously run multiple ruby version on the same machine. You see, Rails 3.0 just came out and I thought it would run on Ruby 1.9.1 but it won't. It require's Ruby 1.9.2. So I upgraded my OS X dev box and manually created the new symlinks. All was well, but I wasn't sure how my apps that required 1.9.1 would behave. So I researched RVM.
To install on your OS X box, it's quite simple. Just make sure that you have XCode installed, as you'll need the GCC.
bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
That's all you need to do to install it!
Edit ~./.bash_profile with the following:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
Open a new shell and you're ready to rock.
To install a Ruby version 1.9.2, just type:
rvm install 1.9.2
Or for version 1.8.7
rvm install 1.8.7
Switch versions like:
To see where "ruby" is actually installed you type:
To see the gem path:
gem env path
It's like magic! Take note: according to the guide, you should NOT run "sudo" to install rvm.
-JPcomments powered by Disqus