gemfile.lock and gemset Ruby applications
06:36 26 Apr 2016

I am looking for some clarification on the benefits of using a gemset in my application and the difference between these two scenarios.

  1. Specify the ruby version in my Gemfile and have no gemset

  2. create a .ruby-version and .ruby-gemset file

So in the first scenario I would run bundle and all of my gems dependencies and versions would be written to the Gemfile.lock

In the second scenario the same would happen but a gemset would also be created. Each time I cd into the project with the gemset, it uses that gemset.

My scenario is I have multiple Ruby applications and I don't want to have any gem incompatibility issues and also keep a consistent approach.

So firstly am I missing some fundamentals here, and secondly what value would the gemset give me that is not already covered by the Gemfile.lock?

ruby