RubyGems Navigation menu

Blog

Back to blog posts

4.0.0 Released

RubyGems 4.0.0 includes features, performance, enhancements, bug fixes, security, breaking changes, deprecations and documentation and Bundler 4.0.0 includes features, performance, enhancements, bug fixes, security, breaking changes and documentation.

To update to the latest RubyGems you can run:

gem update --system [--pre]

To update to the latest Bundler you can run:

gem install bundler [--pre]
bundle update --bundler=4.0.0

RubyGems Release Notes

Features:

  • Undeprecate Gem::Version.new(nil). Pull request #9086 by tenderlove
  • Add pattern matching support to Gem::NameTuple. Pull request #9064 by baweaver
  • Add pattern matching support to Gem::Platform. Pull request #9062 by baweaver

Performance:

  • Add MAKEFLAGS=-j by default before compiling. Pull request #9131 by Edouard-chin
  • Remove some memoization. Pull request #9017 by tenderlove
  • Pull Gem.win_platform? out of a hot path. Pull request #8983 by tenderlove
  • Stop trying to remove every file on extraction. Pull request #8974 by tenderlove
  • Use IO.copy_stream with IO object directly. Pull request #8970 by tenderlove
  • Pass a file size to IO.copy_stream. Pull request #8966 by tenderlove
  • Use File#chmod rather than FileUtils.chmod. Pull request #8965 by tenderlove

Enhancements:

  • Update all vendored libraries to latest version. Pull request #9089 by hsbt
  • Removed unused Gem::Deprecate. Pull request #9090 by hsbt
  • Add debug logging information to see the time it took to download and install a gem. Pull request #9066 by Edouard-chin
  • Fix constants in TAR to be frozen. Pull request #9041 by tenderlove
  • Remove open-ended and prerelease dependency warnings when building gems. Pull request #9050 by jeremyevans
  • Revamp CmakeBuilder. Pull request #8753 by cfis
  • Restrict what schemes are acceptable in the remote fetcher. Pull request #9022 by tenderlove
  • gem sources --prepend and --append allow finer grained control of sources. Pull request #8901 by martinemde
  • Improve gem sources --remove output. Pull request #8909 by deivid-rodriguez
  • Make gem sources output more clear. Pull request #8938 by deivid-rodriguez
  • Don’t fail if there is no makefile, simply don’t do anything. Pull request #8879 by ioquatix
  • Use IMDSv2 for S3 instance credentials. Pull request #7709 by folbricht-stripe
  • Fix regression in presence of RVM gems. Pull request #8854 by deivid-rodriguez
  • Restore parsing “–” as an unknown platform rather than crashing. Pull request #8846 by deivid-rodriguez
  • Installs bundler 4.0.0 as a default gem.

Bug fixes:

  • Fix test failure of mswin and nmake. Pull request #9135 by hsbt
  • Respect BUNDLE_VERSION config at Gem::BundlerVersionFinder. Pull request #9106 by hsbt
  • Fix “did you mean” suggestions for unknown commands. Pull request #8948 by deivid-rodriguez
  • Fix trailing slashes not considered by gem sources --remove. Pull request #8939 by deivid-rodriguez

Security:

  • Bump up vendored URI to 1.0.4. Pull request #9031 by hsbt

Breaking changes:

  • Removed deprecated -C option from gem build. Pull request #9088 by hsbt
  • Removed deprecated Gem::Specification#has_rdoc, has_rdoc= and has_rdoc?. Pull request #9084 by hsbt
  • Removed deprecated gem query command. Pull request #9083 by hsbt
  • Removed deprecated Gem::DependencyInstaller#find_gems_with_sources. Pull request #9082 by hsbt
  • Remove deprecated methods of RubyGems. Pull request #9081 by hsbt
  • Make verification methods private. Pull request #9051 by tenderlove
  • Deprecate --default option from install command. Pull request #7588 by hsbt
  • Removed compatibility.rb for RG 4.0. Pull request #8899 by hsbt

Deprecations:

  • Deprecate Gem::Specification#datadir. Pull request #8900 by hsbt

Documentation:

  • Unified UPGRADING.md and extract blog.rubygems.org. Pull request #9148 by hsbt
  • Remove italic formatting from changelog section headers. Pull request #9128 by hsbt
  • [DOC] Fix the location of Gem::Deprecate document. Pull request #9065 by nobu
  • Fix typo. Pull request #9012 by etiennebarrie
  • Added document for Gem::Uninstaller. Pull request #8904 by hsbt
  • Use mailto link in Code of Conduct. Pull request #8849 by deivid-rodriguez
  • Update Code of Conduct email to conduct@rubygems.org. Pull request #8848 by indirect

Bundler Release Notes

Features:

  • Support bundle install –lockfile option #9111
  • Add support for lockfile in Gemfile and bundle install –no-lock #9059
  • Add --ext=go to bundle gem #8183
  • Update Bundler::CurrentRuby::ALL_RUBY_VERSIONS #9058
  • Introduce bundle list --format=json #8728

Performance:

  • Run git operations in parallel to speed things up: #9100
  • Replace instance method look up in plugin installer #9094
  • Adjust the API_REQUEST_LIMIT to make less network roundtrip #9071

Enhancements:

  • Make BUNDLE_LOCKFILE environment variable have precedence over lockfile method in Gemfile #9146
  • Improve banner message for the default command #9145
  • Introduce install_or_cli_help and use it default bundle command #9136
  • Add go_gem/rake_task for Go native extension gem skeleton #9105
  • Warn users that bundle now display the help: #9092
  • Use DidYouMean::SpellChecker for gem suggestions in Bundler #3857
  • Update all vendored libraries to latest version #9089
  • We don’t need to allow some warning now #9074
  • Support to embedded Pathname #9056
  • Enforce activation of irb when running with bundle console #9033
  • Update Magnus version in Rust extension gem template #9025
  • Add checksum of gems hosted on private servers: #9004
  • Loading support on Windows #8254
  • Improve error message when the same source is specified through gemspec and path #8460
  • Raise an error in frozen mode if some registry gems have empty checksums #8888
  • Bump vendored thor to 1.4.0 #8883
  • Delay default path and global cache changes to Bundler 5 #8867
  • Fix spacing in bundle gem newgem.gemspec.tt #8865
  • Add some missing deprecation messages #8844

Bug fixes:

  • Fixed checksums generation issue when no source is specified #9133
  • Check for file existence before deletion from cache #9095
  • Use method_defined?(:method, false) #9098
  • Handle BUNDLER_VERSION being set to an empty string #6928
  • Fix bundle install when the Gemfile contains “install_if” git gems: #8992
  • Fix installation issue related to path sources and precompiled gems #8973
  • Fix outdated lockfile during bundle lock when source changes #8962
  • Raise error on missing version file #8963
  • Fix bundle cache --frozen and bundle cache --no-prune not printing a deprecation message #8926
  • Fix local installation incorrectly forced if there’s a vendor/cache directory and frozen mode is set #8925
  • Fix bundle lock --update <gem> with --lockfile flag updating all gems #8922
  • Fix bundle show --verbose and recommend it as an alternative to bundle show --outdated #8915
  • Fix bundle cache --no-all not printing a deprecation warning #8912
  • Fix bundle update foo unable to update foo in an edge case #8897
  • Fix Bundler printing more flags than actually passed in verbose mode #8914
  • Fix bundler failing to install sorbet-static in truffleruby when there’s no lockfile #8872
  • Cancel deprecation of --force flag to bundle install and bundle update #8843

Security:

  • Bump up vendored URI to 1.0.4 #9031

Breaking changes:

  • Fix triple spacing when generating lockfile #9076
  • Hide patchlevel from lockfile #7772
  • Remove bundler_4_mode #9038
  • Pick and add extra changes for 4.0.0 version #9018
  • Replaced Bundler::SharedHelpers.major_deprecation to feature_removed! or feature_deprecated! #9016
  • Removed legacy_check option from SpecSet#for #9015
  • Make update_requires_all_flag to settings #9011
  • Make default cli command settings #9010
  • Make global_gem_cache flag to settings #9009
  • Consolidate removal of Bundler.rubygems.all_specs #9008
  • Consolidate removal of Bundler::SpecSet#- and Bundler::SpecSet#<< #9007
  • Replaced Bundler.feature_flag.plugins? to Bundler.settings #9006
  • Make bundle show --outdated raise an error #8980
  • Make --local-git flag to bundle plugin install raise an error #8979
  • Switch cache_all to be true by default #8975
  • Completely forbid passing --ext to bundle gem without a value #8976
  • Switch lockfile_checksums to be true by default #8981
  • Make bundle install --binstubs raise an error #8978
  • Make bundle remove --install raise an error #8977
  • Remove support for multiple global sources in Gemfile & lockfile #8968
  • Remove allow_offline_install setting #8969
  • Completely remove --rubocop flag to bundle gem, and related configuration #8967
  • Completely remove all remembered CLI flags #8958
  • Remove implementation of deployment, capistrano and vlad entrypoints #8957
  • Remove deprecated Bundler.*clean*, and Bundler.environment helpers #8924
  • Remove deprecated bundle viz and bundle inject commands #8923
  • Removed to workaround for Bundler 2.2 #8903

Documentation:

  • Unified UPGRADING.md and extract blog.rubygems.org #9148
  • Remove italic formatting from changelog section headers #9128
  • Small clarifications to Bundler 4 upgrade docs #8964
  • Improve documentation of bundle doctor, bundle plugin, and bundle config #8919
  • Make sure all CLI flags and subcommands are documented #8861
  • Clarify documentation about new default gem installation directory in Bundler 4 #8857
  • Use mailto link in Code of Conduct #8849
  • Update Code of Conduct email to conduct@rubygems.org #8848
  • Add missing link to irb repo in DEBUGGING.md #8842

Manual Installation

To install RubyGems by hand see the Download RubyGems page.

SHA256 Checksums:

  • rubygems-4.0.0.tgz
    31ee4f84cf6d06db294f998d6028835e286847c8b3fed7b9037f9b8562abdb84
  • rubygems-4.0.0.zip
    1fd3800c4aa945a246965ca3de89e8e21dd191ece2154526694f99f49819f1cc
  • rubygems-update-4.0.0.gem
    acb143e17e81d2851ecdc0d06f9362b05d4dcf288b53775b4588fe1401f8c3a6
Hiroshi SHIBATA