views:

37

answers:

1

Ruby Version Manager allows us to use an .rvmrc file in each project to set up which ruby version and gem set to load. Should this file be checked in to source control? Or does this presume too much about other developers' working environment?

+1  A: 

Source Control Management is mainly about reproducibility: are you able to reproduce a version of a development effort based on what you have stored in your SCM?

If that .rvmrc file is needed for any developer on your project to be able to work (with the right artifacts), then yes, you should versioned it.

As mentioned in RVM Best Practices:

No. 2 - Check your rvmrc into source control.

By checking the aforementioned rvmrc into source control along side your app, you're ensuring all users have a consistent environment when they're using rvm.

By also automating gemset installs and the like (e.g. check out the rvmrc in the rvm-site repository or the TEDxPerth repostory's rvmrc) you also make getting started as simple as changing directory.

On top of this, you can also automatically make your deployments setup your application specific environment.

VonC
interesting point. I keep my rvmrc in my home directory, will have to consider doing otherwise.
Jed Schneider