Thursday, September 13, 2012

rvm use @$(basename `pwd`) --create

Had been using the following in most projects:
rvm use ruby-1.9.3-p194@name_of_the_project --create
but just noticed because the virtus project had a .rvmrc that the cool kids seem to use:
rvm use @$(basename `pwd`) --create
which is a lot nicer. Google that and you'll see a number of people using it.

I guess if you were switching between versions of Ruby, you'd just have to be mindful and ensure that the project supports whatever version you have RVM using, but it does the job of ensuring that the project has a gemset without defining the version of ruby just in case you want to update your patch release level at some point and might forget that the .rvmrc for that project is using an older patch level of Ruby. Neat!

Here's another post about it.

No comments: