You can have a .rvmrc file in three different places:

The global and user .rvmrc files are mainly compile options for installing new Rubies. However, the project-specific .rvmrc files are the fun ones.

Here's how you do it:

It gets even better with gemsets.

Sigue un ejemplo. Creo un .rvmrc en un directorio conteniendo el proyecto de un alumno:

[~/eleazar-src/prueba-activedirectory(testeo)]$ rvm --rvmrc --create 1.9.3-p392@eleazar-pfc
Veamos la cabecera del .rvmrc:
[~/eleazar-src/prueba-activedirectory(testeo)]$ head -3 .rvmrc 
#!/usr/bin/env bash

# This is an RVM Project .rvmrc file, used to automatically load the ruby
Ahora si entro en el directorio, la primera vez me lanza un warning:
[~/eleazar-src]$ rvm use 2.0.0-p0
Using /Users/casiano/.rvm/gems/ruby-2.0.0-p0
[~/eleazar-src]$ ruby -v
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin11.4.2]
[~/eleazar-src]$ cd prueba-activedirectory/
You are using '.rvmrc', it requires trusting, it is slower and 
it is not compatible with other ruby managers,
you can switch to '.ruby-version' using 
            'rvm rvmrc to [.]ruby-version'
* Do you wish to trust '/Users/casiano/eleazar-src/prueba-activedirectory/.rvmrc'?  
y[es], n[o], v[iew], c[ancel]> y
-bash: /usr/bin/shasum: Permission denied
[~/eleazar-src/prueba-activedirectory(testeo)]$ ruby -v
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin11.4.2]
Para hacer que el mensaje de advertencia no aparezca:
$ rvm rvmrc warning ignore /Users/casiano/eleazar-src/prueba-activedirectory/.rvmrc
Using /Users/casiano/.rvm/gems/ruby-2.0.0-p0
$ cd prueba-activedirectory/
-bash: /usr/bin/shasum: Permission denied
$ ruby --version
ruby 1.9.3p392 (2013-02-22 revision 39386) [x86_64-darwin11.4.2]


Casiano Rodriguez León 2015-01-07