Skip to content

Commit 667626b

Browse files
committed
Fix JRuby 9.3 build
The Ruby version targeted by JRuby 9.3 is now too old for Rubygems to run. Let's pin to the last version that works for now. When we next have a major version bump for one of the breaking changes we're planning to make (likely around the store interface), we'll clear out support for any Ruby versions that have fallen out of security support. Signed-off-by: Chris Sinjakli <chris@sinjakli.co.uk>
1 parent 6fbdfa9 commit 667626b

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

.circleci/config.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,23 @@ jobs:
1212

1313
steps:
1414
- checkout
15-
# JRuby <= 9.2.x is no longer supported by the `rubygems-update` gem, which now
16-
# requires at least Ruby 2.6 compatibility.
15+
# We need to limit the version of Rubygems that we update to for some of the older
16+
# JRuby versions. Specifically:
17+
#
18+
# - JRuby 9.2.x targets Ruby 2.5, and Rubygems 3.3.26 was the last version to
19+
# support that
20+
# - JRuby 9.3.x targets Ruby 2.6, and version 3.4.22 was the last version to
21+
# support that
1722
#
1823
# For now, we'll pin to the last supported version. We can drop this check once we
1924
# drop all those versions of JRuby.
2025
- run: |
21-
running_old_ruby=$(ruby -e 'puts Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.6.0")')
22-
if [[ "${running_old_ruby}" == "true" ]]; then
26+
running_very_old_ruby=$(ruby -e 'puts Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.6.0")')
27+
running_moderately_old_ruby=$(ruby -e 'puts Gem::Version.new(RUBY_VERSION) < Gem::Version.new("3.0.0")')
28+
if [[ "${running_very_old_ruby}" == "true" ]]; then
2329
gem update --system 3.3.26
30+
elif [[ "${running_moderately_old_ruby}" == "true" ]]; then
31+
gem update --system 3.4.22
2432
else
2533
gem update --system
2634
fi

0 commit comments

Comments
 (0)