The project .rvmrc
files are intended to be used to setup your
project's ruby environment when you switch to the project root
directory.
Véase Use rvmrc or ruby-version file to set a project gemset with RVM? en StackOverFlow
If your .rvmrc
file contains custom shell code, continue using
.rvmrc
as it allows you to include any shell code.
If your only aim is to switch Ruby versions, then use .ruby-version which is supported by other Ruby version switchers such as rbenv or chruby . This file also does not require trusting as it is just the name of a Ruby version and will not be executed in any way.
If you use .ruby-version
you can include
@gemset
in the file but this will not be compatible with other
switchers. To maintain compatibility use the gemset name in a separate
file .ruby-gemset which is ignored by other tools.
For example, if you have a simple .rvmrc
:
rvm use 1.9.3@my-appIt can be transformed to
.ruby-version
:
1.9.3And
.ruby-gemset
:
my-appBe sure to remove the
.rvmrc
file as
it takes precedence over any other project configuration files:
rm .rvmrc
Casiano Rodriguez León 2015-01-07