Should I commit .rvmrc files in the project?

Each of my projects has a specific .rvmrc. Since my gemsets are private, I usually add .rvmrc to .git / info / exclude. Should I add .rvmrc to .gitignore? Should I transfer his repo? Or am I doing it right?

+6
source share
4 answers

I think the best use for .rvmrc is to fix it .

Others say that if you work with others, they can easily set gemstones with a bunch. But this is not necessarily the same Ruby version that they use, for example. If you use .rvmrc and you commit it, while others also use it, it ensures that all configs are the same.

In addition, someone wrote about different environments in development and production. This is not a good habit. Development, testing and production environments should be as close to each other as possible. .rvmrc just guarantees this, no doubt.

In addition: it helps you manage multiple projects in parallel . Every time you enter the folder with the -rvmrc file if you change your Gemset. Otherwise, you may forget to change versions and may have unnecessary struggles and confusing Gemsets.

+4
source

Use a middleware for dependency management (trust me that porting from gemsets to bundler is pretty easy) and use .rvmrc (and commit it) only if the project depends on a certain level of ruby ​​version / patch.

+3
source

If you commit .rvmrc, then if someone else is using your project, then they will need to have the same version of ruby ​​and gemset settings. Otherwise, they will receive the error message "cd" in this directory. For this reason, I do not pass my .rvmrc.

If someone grabs your code and wants to save the gems needed for this project separately, it is quite easy to create .rvmrc and the corresponding gemset.

+2
source

I just started using .rvmrc and decided not to fix it, because my server always has only one environment, while my local development environment always has several different configurations.

+1
source

Source: https://habr.com/ru/post/896918/


All Articles