Lazy rock tappers

Leave a comment

November 29, 2012 by Rob Nichols

Do you get bored entering 1.9.2@project every time you enter a different project folder? Then learn to embrace your .rvmrc file.

The simplest way to generate this file is to do so when you create the project gemset:


cd ~/projects/projecta/
rvm --rvmrc --create 1.9.3@projecta

That puts a .rvmrc file in the root of your project. cd out of the project fold and then back in and you will be prompted to trust the new .rvmrc file. Select yes and from this point on, every time you enter the project fold, rvm will automatically load the relevant gem set.

Personally I’d recommend you add .rvmrc to your .gitignore file, as the .rvmrc files includes a build specific ruby version number which can cause problem within groups of developers. Better to manage your own file in my opinion.

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: