Using .rvmrc
seems to be considered a best practice for apps.
But should an open source gem contain .rvmrc
in their source code on Github? I think it’s not good to require everyone who wants to contribute to use the exact same version of Ruby or gemset as you.
By having the .rvmrc in your source control, you are not forcing everybody to use the same version of Ruby as you do. They can easily change the .rvmrc if they have a need to do so. You are merely explicitly telling them what version you used and therefore making it easier for them to start working with your project.
This is also an advantage for contributors as they won’t run into version issues. If your contributors aren’t using RVM then they will have to select the correct Ruby version by hand (or just hope for the best) instead of having it done for them automatically.
FYI there is an emerging standard for having a per project file “.ruby-version” that specifies the correct Ruby version in a simple way and RVM and several others Ruby version managers are already supporting it:
https://gist.github.com/fnichol/1912050
1