Specify a gem version or always use the latest version?

I use RoR webapp in my free time. Like any (I think), I use gems (about 20).

Several times I had errors when deploying the application in a production environment, because I did not specify the exact version for all my gems, so some of them were updated, which led to errors.

I am worried about staying in a specific version for all my gems, and when I need to update one (or some) of them, it all broke down (I had problems creating gems for fly-sphinx and twitter for collaboration after upgrade).

My question is: should an incomplete encoder correct over and over again the entire version of gems used, or is it worth checking every update? How do you manage your gemfile?

I also think that when you are full time, you should always be in the know (security, performance), but is this really true?

+3
source share
1 answer

I mainly stick to this version specification:

gem "blah", "~> 1.4.2"

which means version number >= 1.4.2but< 1.5.0

Most gems follow the semantic version of the scheme, or at least only break the material when making the transition to the version. Thus, I am "safe", but still get good details (bug fixes, etc.).

- Gemfile.lock, . , .

+5

All Articles