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?
相关问题
- How to specify memcache server to Rack::Session::M
- Why am I getting a “C compiler cannot create execu
- reference to a method?
- ruby 1.9 wrong file encoding on windows
- gem cleanup shows error: Unable to uninstall bundl
相关文章
- Ruby using wrong version of openssl
- Difference between Thread#run and Thread#wakeup?
- What is the tortoisehg gui equivalent of doing “hg
- how to call a active record named scope with a str
- “No explicit conversion of Symbol into String” for
- How to use Mercurial from Visual Studio 2010?
- Segmentation fault with ruby 2.0.0p247 leading to
- How to detect if an element exists in Watir
I would actually advise against keeping
.rvmrc
in SCM. Two specific reasons:If you use gemsets you enforce other developers to use the same gemset (while some might prefer to have all their gems in the global gemset).
You make it hard for other developer(s) to run the project on a different Ruby version. Sure, on production it might run on
1.9.2-p290
, but why should I not be permitted to run the app locally on1.9.3-p0
?Generally it enforces too much on each developer (same story as
database.yml
, which as well should not be kept in SCM). A note in the README of the project of the "production running" Ruby version is enough imo.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:
Other developers can turn of use of gemsets on their RVM with:
This will make them use default gemset always.