Just learned RVM can automatically switch ruby versions based on the current directory.
No more trying to remember which magic rvm use
incantation will return your project to a working state.
1 | $ rvm --ruby-version use [RUBY_VERSION]@[GEMSET_NAME] |
The above will switch to the specified ruby version and gemset and drop two files in the directory:
.ruby-version
will be a one-liner with the ruby version you want.ruby-gemset
will be a one-liner with the gemset you want to use
For example:
1 | $ rvm --ruby-version use ruby-1.8.7-p302@rails-3.0.3 |