01 September 2011

Setting up Rails 3.1 with RVM

Just want to do a quick how to post for those out there wanting to setup Rails 3.1 on RVM and not effect their existing rails 3.0.x setup. To do this we take advantage of RVMs gemsets.

First thing to do is make sure you have the latest version of RVM

$ rvm get latest

or rvm update, depending on the version of rvm you have installed.

next thing to do is create a new gemset for Rails 3.1

$ rvm gemset create rails31

then switch to it

$ rvm gemset use rails31

and finally install rails 3.1

$ gem install rails

And there we go! nice and easy!

If you want to switch back to your rails 3.0.x gemset and haven’t setup a gemset for it, it should still be setup in the default ‘global’ gemset which you may need to reinstall rails 3.0.x into and do all your bundle installs.

###So now what? * Start a new project and have a look around, you’ll notice that the biggest difference is the assets folder in the app directory which holds all your sass and coffee script files. * Take a look at the Sass and Coffee Script documentation to get started with them * Keep an eye on Railscasts for some more in-depth rails 3.1 focussed episodes