[LRUG] Gemfile.lock for gems - to check in or not to check in, that is the question

Panayotis Matsinopoulos panayotis at matsinopoulos.gr
Wed May 10 03:14:29 PDT 2017


As far as I know, the Gemfile.lock is only important (and this is what
bundler advice implies) for the final component that is the executable
against which you run your tests and deploy. I.e. your application. It is
your application that needs to be *locked* to specific versions of gems.
The gems have minimum dependencies on other gems but final dependency/ies
are only relevant for the application. That's why you only check in the
Gemfile.lock for the application.

Panos

On 10 May 2017 at 11:08, Asfand Qazi <ayqazi at gmail.com> wrote:

> Hello,
>
> I have a question regarding Bundler, developing gems, and Gemfile.lock .
> It is a question I thought I had the answer to, but apparently not.
>
> I USED to believe that you do not check in Gemfile.lock, so as to allow
> situations during development to occur where your gem is used with a
> version of a dependency that you did not expect, therefore allowing
> possibly breaking interface changes to dependencies to be made apparent.
> This is what Mr. Katz says here, in 2010: http://yehudakatz.com/2010/12/
> 16/clarifying-the-roles-of-the-gemspec-and-gemfile/.
>
> However, checking the latest bundler docs, here we read something
> different: http://bundler.io/v1.14/guides/creating_gem.html
>
> "By running bundle install, Bundler will generate the extremely important
> Gemfile.lock file. This file is responsible for ensuring that every system
> this library is developed on has the exact same gems so it should always be
> checked into version control. For more information on this file read “THE
> GEMFILE.LOCK” section of the bundle install manpage."
>
> Que?
>
> What do y'all think? Follow the old advice, or the new advice?
>
> Thanks
>
> Regards,
>     Asfand Qazi
>     The DevOps Doctors
>
>     E: asfand at thedevopsdoctors.com
>     W: https://www.thedevopsdoctors.com/
>
> _______________________________________________
> Chat mailing list
> Chat at lists.lrug.org
> Archives: http://lists.lrug.org/pipermail/chat-lrug.org
> Manage your subscription: http://lists.lrug.org/options.cgi/chat-lrug.org
> List info: http://lists.lrug.org/listinfo.cgi/chat-lrug.org
>
>


-- 
Panayotis Matsinopoulos
===========================================
I am sending SMS over the WEB using Rayo SMS <http://sms.rayo.gr/>
*E-mail*: panayotis at matsinopoulos.gr
*My Video Course*: Introduction To Computer Programming
<https://www.udemy.com/introduction-to-computer-programming/?couponCode=EMAIL-SIGNATURE>
*Blog:* http://pmatsinopoulos.github.com/
*Site:* http://pmatsinopoulos.github.io/
*Mobile Number:* +44 75640 16132 (or 075640 16132 from UK)
*Skype Id: *panayotis.matsinopoulos
*Twitter:* http://www.twitter.com/pmatsino
*LinkedIN:* http://www.linkedin.com/in/panayotismatsinopoulos
*Github*: https://github.com/pmatsinopoulos
*Rubygems:* https://rubygems.org/profiles/55099
*Google+:* https://www.google.com/+PanayotisMatsinopoulos
*YouTube: *http://www.youtube.com/user/pmatsinopoulos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lrug.org/pipermail/chat-lrug.org/attachments/20170510/db40d371/attachment.html>


More information about the Chat mailing list