RubyGems 4.1.0 shipped on November 16, 2026, a little under a year after RubyGems/Bundler 4.0 landed alongside Ruby 4.0.0. If 4.0 was mostly about making installs faster — parallel C-extension builds, a bigger connection pool — 4.1 is a different kind of release: it replaces the algorithm at the core of every bundle install you’ve ever run, and it adds several features that only make sense in a world where package registries are an active attack surface, not just a convenience.
1. Summary
RubyGems 4.1 does three things that matter, in order of how often you’ll notice them:
- It resolves your dependencies differently. The resolver that’s been underneath
gem installandbundle installfor over a decade, Molinillo, is gone. In its place is PubGrub — the same resolution algorithm Dart’spubpackage manager uses — chosen specifically because it can explain why a resolution failed instead of just reporting that it did. - It gives you a grace period before trusting a new gem version. The new
--cooldownflag tells Bundler to ignore versions published too recently, so a just-published (and possibly compromised, or just plain broken) release doesn’t get pulled into your app the moment it hits the registry. - It drops a C dependency and adds post-quantum signing. YAML parsing no longer goes through
libyaml/Psych — it’s pure Ruby now — and gem signing gained support for ML-DSA, a NIST post-quantum signature algorithm, alongside new content-addressable gem packaging.
None of this requires you to change your Gemfile. Most of it requires you to change nothing at all. A few things do require attention — covered in section 4 — but there’s no bundle update --4.1-compat ceremony here.
2. Requirements and motivations behind 4.1
RubyGems and Bundler have technically been two separate codebases bundled together for years — RubyGems had its own dependency resolver, its own lockfile-adjacent logic, and its own gem cache; Bundler had a second resolver, a second lockfile parser, and a second cache, doing largely the same job with separate code. The RubyGems team’s own stated roadmap after shipping 4.0 was explicit about this: 4.1’s job was to start consolidating those duplicated subsystems into one.
That’s the thread running through most of 4.1’s changes:
- “Bundler’s lockfile parser replaces RubyGems’ own parser” — one lockfile parser instead of two.
- “Global gem cache shared by RubyGems and Bundler” — one cache on disk instead of two copies of every gem you’ve ever installed.
- “Compact index adopted for gem commands” — the fast, incremental index format Bundler has used for years is now also used by plain
gem install/gem update, not justbundle install. - “Molinillo replaced with PubGrub for dependency resolution” — one resolver, and a better one, instead of RubyGems and Bundler each maintaining their own resolution logic around the aging Molinillo algorithm.
The second motivation is supply-chain security, and it’s not subtle about it. Cooldown windows, post-quantum signing, content-addressable gems, and an opt-in OS credential store for your RubyGems API keys all showed up in the same release. None of these are performance work — they’re all direct responses to the same reality every package ecosystem (npm, PyPI, crates.io) has been dealing with: attackers compromise maintainer accounts and push malicious versions, and the faster those versions get installed, the more damage they do before anyone notices.
3. Major changes, explained
The dependency resolver: Molinillo → PubGrub
Every time bundle install has to figure out which version of every gem in your dependency tree is compatible with every other gem’s requirements, something has to search the space of possible combinations. For over a decade, that something was Molinillo, a backtracking resolver. When Molinillo hit a conflict — gem A needs rails ~> 7.0, gem B needs rails ~> 8.0 — it could tell you a conflict happened, but working out which specific combination of requirements caused it often meant reading a wall of version numbers and reasoning about it yourself.
PubGrub (the algorithm, not just a library — it’s the same one powering Dart’s pub) was built specifically to produce a step-by-step explanation of why no solution exists, not just that none exists. Conceptually, instead of a dead end, you get a derivation: “no version of rails satisfies both ~> 7.0 (required by gem-a) and ~> 8.0 (required by gem-b), and no version of gem-a or gem-b exists that would relax either requirement.” RubyGems’ own commit history around this change specifically calls out work on “contradictory requirements” messaging and “extended explanations for platform and Ruby version hints” — the stated goal is a resolver error you can act on without opening an issue asking what it means.
You don’t do anything to opt into this — it’s the only resolver in 4.1. If your app resolves successfully today, it’ll almost certainly keep resolving the same way; what changes is what happens when it doesn’t.
Cooldown: a grace period before a gem version is trusted
This is the feature most worth adding to your team’s workflow deliberately, rather than just inheriting it. --cooldown tells Bundler: “don’t consider a gem version that was published fewer than N days ago.”
# Don't resolve to anything published in the last 7 daysbundle install --cooldown 7bundle update --cooldown 7bundle add rails --cooldown 7
# See what's outdated, with cooldown-filtered versions clearly markedbundle outdated --cooldown 7Set it once instead of typing it every time:
bundle config set --global cooldown 7# orexport BUNDLE_COOLDOWN=7bundle outdated doesn’t just hide versions inside the cooldown window — it tells you they exist and when they’ll clear: the table form appends (cooldown Nd) next to a version that’s still waiting it out. Precedence runs CLI flag → config setting → a per-source cooldown: value in the Gemfile itself, and --cooldown 0 on any command disables it for that one run — useful when a CVE fix just shipped and you need it now, not in seven days:
bundle update rack --cooldown 0 --conservativeNote
Why this matters: a malicious package release is most dangerous in the hours right after
publication, before anyone’s had a chance to notice something’s wrong and yank it. A cooldown
window doesn’t make a compromised release safe — it just means your bundle update on Tuesday
morning isn’t the thing that pulls in a version that gets pulled from the registry on Tuesday
afternoon.
Content-addressable gems and post-quantum signing
Two separate but related integrity features landed together. Content-addressable gem support (gem build --content-addressable, plus support in Gem::PackageTask) means a gem package can be referenced and verified by a hash of its actual content, not just by its name and version string — the same principle behind how Git and container registries guarantee you got the bytes you think you got, not just a file that happens to have the right filename.
Alongside that, the signed-gems workflow now supports ML-DSA (Module-Lattice Digital Signature Algorithm), one of the signature schemes NIST standardized as part of its post-quantum cryptography effort. Gem signing itself isn’t new — RubyGems has supported signing releases for years — but the signature algorithms available to do it with have, until now, all been ones a sufficiently capable quantum computer is expected to eventually break. ML-DSA is designed not to be.
Neither of these changes anything about how you gem install something today. They matter if you maintain and sign gems yourself, or if you’re the kind of team that cares about having an answer ready for “what’s our plan when ECDSA-signed packages stop being trustworthy.”
Pure-Ruby YAML parsing — no more libyaml dependency for this
RubyGems used to lean on Psych, Ruby’s YAML library, which itself wraps libyaml, a C library. 4.1 replaces that with a pure-Ruby YAML parser for RubyGems’ own internal use. Practically, this means one less native dependency in the chain between “install Ruby” and “run gem install” — relevant on platforms where getting libyaml built and linked correctly has always been a minor source of friction (certain containers, some Windows setups, WASM targets), and one less thing that can be the wrong version or missing entirely when something mysteriously fails during a gem operation.
This is strictly an internals change for how RubyGems reads its own metadata files — it isn’t a general-purpose Psych replacement, and it doesn’t change how your app’s config/*.yml files get parsed by Psych/YAML at runtime.
One shared cache, one shared index, for both tools
gem install and bundle install used to maintain separate caches, which meant a gem you’d already downloaded via one tool got downloaded again the first time you used the other. 4.1 gives them one shared global gem cache, and separately, plain gem commands now use the same compact index format Bundler has relied on for fast, incremental metadata fetches, instead of the older, heavier index format. Together: less disk space for the same set of gems, and faster gem install/gem update specifically, since they’re no longer fetching the slow index format Bundler left behind years ago.
4. Upgrading: what to do, and what it changes in an existing system
To get it:
gem update --system# or, if your project pins a specific RubyGems/Bundler versiongem install bundler -v 4.1.0Before you upgrade a CI pipeline or a whole team, check these — they’re the confirmed breaking changes in 4.1, directly from the release notes:
gem build --platformnow builds a platform-specific gem for your local platform, where it previously behaved differently. If any of your build scripts pass--platformexpecting the old behavior, check the output artifact’s platform tag after upgrading, before you push it anywhere.gem update --user-installno longer touches gems installed outside your user directory. If a script relied on it reaching into a system-wide install, it won’t anymore — this is a narrowing of scope, not an error, so it’ll likely just silently do less than before rather than fail loudly.- Building a gem with a self-reference now raises an error, where it was previously tolerated. If you have a gemspec that, directly or through a dependency chain, ends up depending on itself,
gem buildwill now tell you instead of quietly producing a gem that worked by accident. require_relativewith a C extension now emits a warning (DEFAULT_INSTALL_EXTENSION_IN_LIBwas reverted). If your gem’s own code loads its compiled extension viarequire_relativeinstead ofrequire, expect a warning in your logs — not a failure, but worth fixing at the source.Gem::BasicSpecification#datadiris removed outright — this was deprecated back in 4.0 specifically so it could be removed now. If anything in your codebase or a gem you maintain still calls.datadiron a spec object, it breaks on 4.1, full stop, not a warning.- The long-deprecated
Gem::Listis gone. Vanishingly unlikely to affect an app, but a real removal if some old internal tooling still references it.
What almost certainly needs zero changes: your Gemfile, your Gemfile.lock format, and the actual set of gems you depend on. The resolver swap, the shared cache, and the YAML parser change are all internal — they change how RubyGems and Bundler do their job, not what bundle install produces for a project that already resolves cleanly today.
What’s worth adopting deliberately, not just inheriting: cooldown. Pick a window — a week is a reasonable starting point — set it with bundle config set --global cooldown 7 on your CI runners and dev machines, and keep the --cooldown 0 escape hatch in mind for the day you need a security patch faster than your own policy allows. It’s the one change in this release that actually asks you to make a decision, rather than just taking the faster, more consolidated plumbing for free.