RVM – Gemsets

Creating gemsets

Gemsets must be created before being used. To create a new gemset for the current ruby, do this:
rvm 2.1.1
rvm gemset create teddy
Gemset 'teddy' created.

Alternatively, if you prefer the shorthand syntax offered by rvm use, employ the –create option like so:
rvm use 2.1.1@teddy --create

Select gemsets according to the Project

There is a new way to do this, without having to allow arbitrary shell script to be executed in a .rvmrc file.

Create a file named .ruby-gemset containing only the gemset name in.
Need an up to date version of rvm for this to work.

You can also specify the ruby version by creating a file named .ruby-version containing only the ruby version:

This format also has the advantage of being compatible with rbenv and rbfu.

If you have existing projects using the deprecated .rvmrc, you can convert them to the new format using the command:
rvm rvmrc to .ruby-version