Answers ( 1 )

  1. 2016-10-17 22:10

    No, an exactly specified Gemfile and using a Gemfile.lock is not the same.

    Your Gemfile might include all gems you are using with a specific version. But the Gemfile.lock will also include all gems that are dependencies of the gem you use. That means that a typical Gemfile.lock will include way more gems when a Gemfile.

    Furthermore: You might can gems or gem versions to your Gemfile that are incompatible to each other. A Gemfile.lock is generated by bundler and represents a set of gem versions that are compatible to each other. If bundler is not able to fulfill all required dependencies than it will not generate a Gemfile.lock.

    That said: Pin only versions in your Gemfile that you need to pin because of version requirements of your app. Let bundler find a valid combination and check that Gemfile.lock into version control system.

◀ Go back