BUNDLE-LOCK(1)

πŸ’– BUNDLE-LOCK πŸ’–

okay bestie, so bundle-lock lives in the General Commands Manual section (section 1, the classics), and it's here to Creates / Updates a lockfile without installing. yep that's the whole name line, we're keeping it, it's iconic.


✨ 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]
[--cooldown=NUMBER]

like. look at her. that's a LOT of flags and she's serving every single one 🫢


🌸 DESCRIPTION 🌸

Lock the gems specified in Gemfile.

that's it. that's the description. short queen. no notes. πŸ’…


πŸŽ€ OPTIONS πŸŽ€

strap in, there's 18 of them and each one is doing the absolute most.

  • --update[=<list>] β€” bestie this one IGNORES the lockfile that already exists 😭 like, completely disregards her. it resolves and then updates the lockfile. you can hand it a list of gems, or if you don't give it a list it updates all the gems. main character energy fr.
  • --bundler[=BUNDLER] β€” updates the locked version of bundler to the version you give it, or to the latest version if you didn't give one. she'll just go grab the newest one herself πŸ’…
  • --local β€” do NOT attempt to connect to rubygems.org, periodt. instead, Bundler uses the gems that are already chilling in Rubygems' cache or in vendor/cache. ⚠️ heads up though: if an appropriate platform-specific gem exists on rubygems.org, it will not be found. so like, that gem is just not coming to the party.
  • --print β€” prints the lockfile to STDOUT instead of writing it to the file system. look at her, no commitment, just vibes πŸ¦‹
  • --lockfile=LOCKFILE β€” the path where the lockfile should be written to. tell her where to put it.
  • --full-index β€” falls back to using the single-file index of all gems.
  • --gemfile=GEMFILE β€” use the specified gemfile instead of [Gemfile(5)][Gemfile(5)]. so specific, love that for us.
  • --add-checksums β€” adds checksums to the lockfile. security girlie πŸ’œ
  • --add-platform=<list> β€” adds a new platform to the lockfile, and re-resolves for the addition of that platform. she's thorough.
  • --remove-platform=<list> β€” removes a platform from the lockfile. bye bitch πŸ‘‹
  • --normalize-platforms β€” normalizes lockfile platforms. ✨ clean ✨
  • --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 one is the default, so it's the unbothered fave).
  • --pre β€” if updating, ALWAYS chooses the highest allowed version, no matter what the prerelease status is. she's chaotic. she's fearless. she's picking the pre version.
  • --strict β€” if updating, does NOT allow any gem to be updated past the latest --patch | --minor | --major. no sneaking past the line, bestie.
  • --conservative β€” if updating, uses bundle install conservative update behavior and does not allow shared dependencies to be updated. very "we're not touching your stuff" of her.
  • --cooldown=<number> β€” only considers gem versions published at least number days ago when resolving. pass 0 to disable cooldown for this run, which overrides any per-source or global configuration. see cooldown in bundle-config(1). it's giving "let it marinate" πŸ“

πŸ”₯ UPDATING ALL GEMS πŸ”₯

If you run bundle lock with the --update option and without a list of gems, bundler will ignore any previously installed gems and resolve all dependencies again, based on the latest versions of all gems available in the sources.

like. everything. all of it. fresh start. no cap. πŸ’€


🧚 UPDATING A LIST OF GEMS 🧚

Sometimes you want to update, like, 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.

only nokogiri gets the glow up. everyone else stays exactly where they are. obsessed πŸŽ€


🌈 SUPPORTING OTHER PLATFORMS 🌈

If you want your bundle to support platforms other than the one you're running locally, you can run:

bundle lock --add-platform PLATFORM

which adds PLATFORM to the lockfile, 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. the way that works is genuinely so convenient, I'm not even joking 😭✨

For a full explanation of gem platforms, see gem help platform.


⭐ PATCH LEVEL OPTIONS ⭐

See bundle update(1) bundle-update.1.html for details. go read that one, bestie, she's got the lore πŸ‘‘


okay and one last thing before you go β€” this whole page is from April 2026, so yeah, she's fresh, she's current, she's got the vibe check passed. love that for her πŸ’–πŸ’…βœ¨

πŸ“¦ where this page comes from