A little bit of adding to bundle install

Source: Internet
Author: User

After running the bundle install for the first time, the Gemfile.lock file is generated, which records the specific version number of the gem, and according to the official documentation, running the bundle install will no longer be based on the gemfile, but install the gem according to the lock file. , so that the version installed in the new machine is different from the lock, causing the gem to clutter up. Actual test steps: 1, first run bundle Install,lock file for Sqlite3 (1.3.11-X86-MINGW32) 2, the Gemfile file in the Gem ' sqlite3 ' changed to Gem ' Sqlite3 ',' 1.3.9 ', then run the bundle Install,lock file as Sqlite3 (1.3.9-X86-MINGW32) 2.1, the Gem ' Sqlite3 ',Change ' 1.3.9 ' back to Gem ' Sqlite3 ', RunBundle Install,lock file is Sqlite3 (1.3.9-X86-MINGW32) 2.2, the Gem ' Sqlite3 ',Change ' 1.3.9 ' back to Gem ' Sqlite3 ' ' 1.3.11 ', RunBundle Install,lock file is Sqlite3 (1.3.11-X86-MINGW32) 2.3, the Gem ' Sqlite3 ',Change ' 1.3.9 ' back to Gem ' Sqlite3 ' ' >=1.3.9 ', RunThe bundle Install,lock file is Sqlite3 (1.3.9-X86-MINGW32) and is not upgraded to 1.3.112.4, the gem ' Sqlite3 ',Change ' 1.3.9 ' back to Gem ' Sqlite3 ' ' >=1.3.10 ', RunBundle Install,lock file for Sqlite3 (1.3.11-X86-MINGW32) Conclusion: 1 It is possible to change a gem in Gemfile without a specific version to a specific version, run the bundle install, modify the lock file, In turn no longer modified, another 2.3 and 2.4 of the situation is very strange, not good explanation, personally think 2.4 should not update the lock file 2 The best practice is to write the specific version in Gemfile, if you need to change, each time with the bundle update Xxgem change a gem version , fully test and then change the version of the second gem; lock files must be included in version management control.

A little bit of adding to bundle install

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.