BUNDLE-LOCK(1)

πŸ“¦ version 4.0.6, in centos-stream 10

πŸ’… BUNDLE-LOCK, but make it make sense

okay bestie, welcome to bundle-lock β€” yes that's the thing you keep seeing in your terminal and scrolling past. it lives in the General Commands Manual and it's genuinely not that deep, i promise 🫢


✨ NAME ✨

bundle-lock β€” creates / updates a lockfile without installing. that's it. that's the whole vibe. no cap. πŸŽ€


🌸 SYNOPSIS 🌸

bundle lock [--update] [--bundler[=BUNDLER]] [--local] [--print]
[--lockfile=PATH] [--full-index] [--gemfile=GEMFILE] [--add-checksums]
[--add-platform] [--remove-platform] [--normalize-platforms] [--patch]
[--minor] [--major] [--pre] [--strict] [--conservative]

like, look at that flag parade. iconic behavior honestly. πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

Lock the gems specified in Gemfile. simple as. it locks them in β€” no install, no drama, just the lockfile doing its main character thing. πŸ’–


πŸŽ€ OPTIONS πŸŽ€

bestie there are 17 of these, buckle up, we're going through every single one:

  • --update[=<list>] β€” ignores the existing lockfile completely (like it never happened πŸ’€). then it resolves, then it updates the lockfile. give it a list of gems and it'll do just those; give it nothing and it updates all the gems.
  • --bundler[=BUNDLER] β€” updates the locked version of bundler to the version you pass in. no version given? it goes and grabs the latest one. ✨
  • --local β€” do not attempt to connect to rubygems.org. instead Bundler uses the gems already chillin' in Rubygems' cache or in vendor/cache. word of warning though: if an appropriate platform-specific gem exists on rubygems.org, it will not be found. 😭 so like, know what you're signing up for.
  • --print β€” prints the lockfile to STDOUT instead of writing it to the file system. peek before you commit, we love a preview. πŸ™ˆ
  • --lockfile=LOCKFILE β€” the path where the lockfile should be written to. you pick the spot. πŸ—ΊοΈ
  • --full-index β€” falls back to using the single-file index of all gems. old school, but make it work.
  • --gemfile=GEMFILE β€” uses the gemfile you specify instead of Gemfile(5).
  • --add-checksums β€” adds checksums to the lockfile. security slay. πŸ”₯
  • --add-platform=<list> β€” adds a new platform to the lockfile, and re-resolves for the addition of that platform.
  • --remove-platform=<list> β€” removes a platform from the lockfile. bye bitch πŸ‘‹ jk jk, it's just a flag.
  • --normalize-platforms β€” normalizes lockfile platforms. tidy queen energy. 🧚
  • --patch β€” if updating, prefers updating only to the next patch version.
  • --minor β€” if updating, prefers updating only to the next minor version.
  • --major β€” if updating, prefers updating to the next major version (this is the default, fyi πŸ‘€).
  • --pre β€” if updating, always chooses the highest allowed version, regardless of prerelease status. rules are off, we're living dangerously. πŸ’€
  • --strict β€” if updating, does not allow any gem to be updated past the latest --patch | --minor | --major. hard boundary. no wiggle room.
  • --conservative β€” if updating, uses bundle install conservative update behavior and does not allow shared dependencies to be updated. very "don't touch my stuff" of it. πŸ’…

🌈 UPDATING ALL GEMS 🌈

so like, if you run bundle lock with the --update option and you don't give it a list of gems, bundler will ignore any previously installed gems and resolve all the dependencies again, based on the latest versions of all gems available in the sources. full reset, full re-resolve, no baggage. ✨


⭐ UPDATING A LIST OF GEMS ⭐

sometimes you want to update literally one gem in the Gemfile(5) and leave the rest of the gems you specified locked to the versions in the Gemfile.lock. relatable, honestly.

for instance, you only want to update nokogiri, so you run:

bundle lock --update nokogiri

Bundler will update nokogiri and any of its dependencies, but leave the rest of the gems that you specified locked to the versions in the Gemfile.lock. surgical. precise. we stan. 🎯


🫢 SUPPORTING OTHER PLATFORMS 🫢

want your bundle to support platforms other than the one you're running on locally? easy. run:

bundle lock --add-platform PLATFORM

that adds PLATFORM to the lockfile and forces bundler to re-resolve and consider the new platform when picking gems β€” all without needing to have a machine that matches PLATFORM handy to install those platform-specific gems on. cross-platform queen behavior, no extra hardware required. πŸ‘‘

for a full explanation of gem platforms, hit up gem help platform. iykyk.


πŸ’œ PATCH LEVEL OPTIONS πŸ’œ

see bundle update(1) bundle-update.1.html for details. they've got the lore, i'm just pointing you there. πŸ“


and that's the whole page bestie!! go forth and lock those gems πŸ’–βœ¨

little sign-off from your girl: this one came from the General Commands Manual and it's stamped April 2026 β€” so it's fresh, it's current, and it's absolutely the version you should be reading. no cap. 🌸

πŸ“¦ where this page comes from
  • centos-stream 10: ruby4.0 4.0.6-37.el10 Β· (Ruby OR BSD-2-Clause) AND (Ruby OR BSD-2-Clause OR GPL-1.0-or-later) AND BSD-3-Clause AND (GPL-3.0-or-later WITH Bison-exception-2.2) AND ISC AND LicenseRef-Fedora-Public-Domain AND MIT AND CC0-1.0 AND zlib AND Unicode-DFS-2015 AND HPND-Markus-Kuhn AND Ruby-pty AND (Ruby OR BSD-2-Clause OR Python-2.0.1) AND BSD-2-Clause AND (Apache-2.0 OR BSL-1.0) AND GPL-2.0-only AND CC-BY-2.5 AND OFL-1.1-RFN AND BSL-1.0
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms