From 75057c90704259e33ea413e5efc2a41cef75170c Mon Sep 17 00:00:00 2001 From: Yasuo Honda Date: Mon, 26 Jan 2026 21:04:04 +0900 Subject: [PATCH] Update fallback RubyGems version to 3.4.22 Since the oldest stable branch in Rails CI is now 7-0-stable, update the fallback RubyGems version to 3.4.22, which is the latest version available for Ruby 2.7.0 (the required_ruby_version for Rails 7.0). - RubyGems 4.0 does not support Ruby 2.7 ``` $ ruby -v ruby 2.7.8p225 (2023-03-30 revision 1f4d455848) [x86_64-linux] $ gem -v 3.1.6 $ bundler -v Bundler version 2.1.4 $ gem update --system Updating rubygems-update Fetching rubygems-update-4.0.4.gem ERROR: Error installing rubygems-update: There are no versions of rubygems-update (= 4.0.4) compatible with your Ruby & RubyGems rubygems-update requires Ruby version >= 3.2.0. The current ruby version is 2.7.8.225. ERROR: While executing gem ... (NoMethodError) undefined method `version' for nil:NilClass ``` - RubyGems 3.4.22 is the last/latest version that supports Ruby 2.7 ``` $ gem update --system 3.4.22 Updating rubygems-update Fetching rubygems-update-3.4.22.gem Successfully installed rubygems-update-3.4.22 Parsing documentation for rubygems-update-3.4.22 Installing ri documentation for rubygems-update-3.4.22 Installing darkfish documentation for rubygems-update-3.4.22 Done installing documentation for rubygems-update after 1 seconds Parsing documentation for rubygems-update-3.4.22 Done installing documentation for rubygems-update after 0 seconds Installing RubyGems 3.4.22 Successfully built RubyGem Name: bundler Version: 2.4.22 File: bundler-2.4.22.gem Bundler 2.4.22 installed RubyGems 3.4.22 installed Regenerating binstubs Regenerating plugins Parsing documentation for rubygems-3.4.22 Installing ri documentation for rubygems-3.4.22 ... snip ... RubyGems system software updated $ ruby -v ruby 2.7.8p225 (2023-03-30 revision 1f4d455848) [x86_64-linux] $ gem -v 3.4.22 $ bundler -v Bundler version 2.4.22 $ ``` - RubyGems v3.5.0 https://github.com/ruby/rubygems/releases/tag/v3.5.0 > Drop ruby 2.6 and 2.7 support. - Drop ruby 2.6 and 2.7 support https://github.com/ruby/rubygems/pull/7116 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9cceeab..df16d54 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ ENV CACHE_INVALIDATION=1 ARG BUNDLER ARG RUBYGEMS RUN set -ex && echo "--- :ruby: Updating RubyGems and Bundler" \ - && (gem update --system ${RUBYGEMS:-} || gem update --system 3.3.27) \ + && (gem update --system ${RUBYGEMS:-} || gem update --system 3.4.22) \ && ruby --version && gem --version && bundle --version \ && codename="$(. /etc/os-release; x="${VERSION_CODENAME-${VERSION#*(}}"; echo "${x%%[ )]*}")" \ && echo "--- :package: Installing system deps for debian '$codename'" \