Gemfile update from Gemfile.lock to freeze gems

After generating Gemfile.lock from the Gemfile, is there any tool to go back there to freeze versions in the Gemfile. I would rather not do it manually.

Reference Information. Good practice is to freeze a minor version on gems, for example. if Gemfile.lock is 2.4.1, I would like to update the Gemfile to include ~> 2.4 ( as described here ).

+5
source share
1 answer

You must define the gemstones that you want to freeze the application in the GemFile itself before starting the installation of the package. After that, you define and run it bundle install, it will generate Gemfile.lock with versions of all installed stones and their dependencies.

Again, the .lock file is automatically generated and should not be manually modified. this is what for gemfile.

0
source

All Articles