Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I commit .rvmrc files in a project? [duplicate]

Every project of mine has a specific .rvmrc. Since my gemsets are private, I tend to add .rvmrc to .git/info/exclude. Should I add .rvmrc to .gitignore? Should I commit it to the repo? Or am I doing it right?

like image 524
Gordon Avatar asked Sep 08 '11 20:09

Gordon


1 Answers

I think the best usage for .rvmrc is to commit it.

Others says if you work with others they can easily install gems with bundle. But it's not necessarily the exact same Ruby version they use for example. If you're using .rvmrc and you commit it and the others also use it then it ensures that all configs will be the same.

Also someone wrote he's different environments in develoment and production. This is not a good habit. Development, test and production environments should be as close to each other as possible. .rvmrc simply ensures it, no doubt.

Further more: it helps you handling more projects paralelly. Everytime you enter a folder which has an -rvmrc file if changes your Gemset. Otherwise you might forgot to change versions and may have unnecessary struggles and confused Gemsets.

like image 165
YogiZoli Avatar answered Sep 26 '22 08:09

YogiZoli