Home > Technology > RVM

RVM

In order to maintain different versions of Ruby, Rails and Gems on your machine, nothing works better than RVM.

Ruby Version Manager also allows for different versions of rails, and gems, and you can switch simply by throwing in
rvm system

Or to create a different ruby/rails environment follow Wayne’s Gist here, reproduced below for posterity.

This example shows how to setup an environment running Rails 3 under 1.9.2 with a ‘rails3′ gem set.
∴ rvm update --head
# ((Open a new shell)) or do 'rvm reload'

# If you do not already have the ruby interpreter installed, install it:
∴ rvm install 1.9.2

# Switch to 1.9.2-head and gemset rails3, create if it doesn't exist.
∴ rvm --create use 1.9.2@rails3

# Install Rails 3 final
∴ gem install rails

# Check to see we now have Rails 3
∴ rails --version
Rails 3.0.0

After you create a rails app, remember to run bundle install – and you’ll have all the necessary gems as part of the appropriate rvm version.

Categories: Technology Tags: , ,