Here is how I like to do it...
- Install a ruby with RVM
- Switch to/use that ruby
- Create a gemset for a project
- Switch to/use that gemset
- Install gems needed
- create an alias that points to my chosen ruby & gemset
- switch to/use that new alias (again, associated w/ a project)
Do this as many times necessary for your different projects that you want to keep separate from eachother.
Example:
$ rvm install ruby-1.9.2
...
$ rvm list
rvm rubies
=> ree-1.8.7-head [ i386 ]
ruby-1.9.2-head [ i386 ]
ruby-1.9.2-preview3 [ i386 ]
$ rvm use ruby-1.9.2-preview3
info: Using ruby 1.9.2 preview3
$ rvm gemset create my_project
info: Gemset 'my_project' created.
rvm gemset use my_project
info: Now using gemset 'my_project'
$ gem install httparty
When you HTTParty, you must party hard!
Successfully installed crack-0.1.8
Successfully installed httparty-0.6.1
2 gems installed
$ rvm alias create my_project ruby-1.9.2-preview3@my_project
info: Creating alias my_project for ruby-1.9.2-preview3@my_project.
info: Recording alias my_project for ruby-1.9.2-preview3@my_project.
$ rvm use my_project
info: Using ruby 1.9.2 preview3 with gemset my_project
$ ....
Now I have an entire environment dedicated to a particular project. This is great because I can experiment with all sorts of different gems/versions without worrying about stomping all over other projects that have very specific requirements.
Good luck!