What is a Gemset?
I have already created
rvm install 1.8.7-head
rvm install 1.9.2
With this, you installed two Rubies (not Gemsets), namely versions 1.8.7 and 1.9.2. These are (simply speaking) just two versions of the Ruby interpreter/language.
Now, each Ruby version normally has a couple of Gems installed (Rails being one). Think of it as a plug-in. In the normal case, you only have one set of plugins for the Ruby on your system. With RVM however, you can configure it to use multiple "Gemsets" per Ruby version. Thus, you can use multiple Ruby versions (e.g. Ruby 1.8.7 and 1.9.2) and have each of them use different Gemsets.
In your case, maybe you want to have two Gemsets for each of your versions:
In addition to Gemsets you create, each Ruby also has a "default" Gemsets. This is the one you get when you don't supply any Gemset name while switching. All of them share one "global" Gemset as well.
How do you create a Gemset?
How do you create such a "testing" Gemset?
As per the manual, first, switch to the Ruby version you want to use:
rvm 1.9.2
… and then create the Gemset, in your case "testing". The part about GEM_HOME
, well, forget it. The manual doesn't mention how to create it. You have to read a bit further down to the example:
rvm gemset create testing
Now your Ruby 1.9.2 will have a Gemset called "testing", which you can switch to with
rvm 1.9.2@testing
Now, any Gem you install with gem install
will reside in this particular Gemset. If you create another Gemset (using rvm gemset create
) and switch to that, the previously installed Gem will not be available, as you're working in another Gemset now.