RubyGems and Bundler 4.1 beta adds override and prune
RubyGems and Bundler 4.1.0.beta2 shipped on October 8, 2026. The Gemfile gains an override directive that rewrites version constraints of dependencies, including transitive ones, while the prune setting deletes download caches and .git directories after install. Both features are opt-in.
- override accepts version:, required_ruby_version: and required_rubygems_version: fields
- Operations include a requirement string, :ignore_upper, ~> and nil to drop constraints
- override is never recorded in Gemfile.lock — only the resolution result is stored
- prune replaces the rm -rf line in Dockerfiles by clearing caches and .git
Read next
Software