I’ve been playing a lot with Rails 3 lately, it’s completely awesome! However, we don’t have any Rails 3 app in production at the moment, all projects that Plataforma has been doing for its clients so far are using Rails 2.3.5. Since I was already having fun with Rails 3, I thought I should also give ruby 1.9 a try. Ok, so how could I have Rails 2.3.5, Rails 3, ruby 1.8.7 and ruby 1.9 in my machine without going crazy? The answer is RVM (Ruby Version Manager)!
RVM is an awesome tool that gives you the power to have as many rubies in your machine as you want, and the best of all, all versions are isolated, no conflicts at all. In order to install it, follow the instructions inside RVM’s site. After that, I installed ruby 1.9.1 through RVM with
rvm install 1.9, installed all the gems necesssary to play with Rails 3 (
gem install rails --pre) and then, I could start to play.
I was playing with that configuration successfully until the moment I got a segmentation fault error. Other people got the same error too. Thankfully the problem didn’t last too long, this was one of these moments which I was very happy for having a Rails Core member in my team (@josevalim). He told me that Rails 3 doesn’t support ruby 1.9.1, actually, it’s supporting ruby 1.9.2! So, I needed to install a new ruby version, and install all Rails 3 gems again, damn it! But, I was fortunate enough for being using RVM.
In order to install Ruby 1.9.2-head and Rails 3 gems, all I needed to do was:
- Update my RVM:
rvm update --head
- Install ruby 1.9.2 head:
rvm install 1.9.2-head
- Create a Rails 3 RVM gemset:
rvm --create use 1.9.2-head@rails3
- Copy my already installed Rails 3 gems to my new RVM gemset within my ruby 1.9.2:
rvm gemset copy 1.9.1 1.9.2-head@rails3
That’s all! After that, I was back to the game! Man, RVM is awesome!!!
And you, do you have any tips about dealing with many versions of ruby and/or Rails, or about RVM?
English. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.