Skip to content

87 ruby/* gems test Ruby < 3.2 on ubuntu-latest, which setup-ruby can't provide once it points to ubuntu-26.04 #156

Closed

Description

@czj

ubuntu-latest is moving to ubuntu-26.04 (actions/runner-images#14748, rolled out until November 19), and ruby/setup-ruby only ships Ruby 3.2 and newer for that image:

Error: Unavailable version 3.1.7 for ruby on ubuntu-26.04

87 repositories of the org call ruby_versions.yml with a min_version below 3.2 and test on ubuntu-latest, so their older-Ruby jobs will fail at setup as soon as their runner flips. None has failed yet: their last runs were on 24.04.

ruby_versions.yml can't fix this on its own since runs-on lives in each caller, but the change there is one line. The generated versions are strings, which GitHub compares as numbers, and head/truffleruby become NaN, so they keep ubuntu-latest. I checked it on a throwaway workflow fed by fromJson: 2.5, 3.0 and 3.1 go to ubuntu-24.04, while 3.2, 4.0, head, jruby and truffleruby stay on ubuntu-latest, and macOS and Windows jobs are untouched:

runs-on: ${{ matrix.os == 'ubuntu-latest' && matrix.ruby < 3.2 && 'ubuntu-24.04' || matrix.os }}
The 87 repositories

base64, benchmark, bigdecimal, bigdecimal, cgi, cmath, csv, date, dbm, debug, debug, delegate, did_you_mean, digest, drb, etc, fcntl, fileutils, find, forwardable, gdbm, getoptlong, iconv, io-console, io-nonblock, ipaddr, irb, json, logger, lrama, mathn, matrix, mutex_m, net-ftp, net-http, net-pop, net-protocol, net-smtp, nkf, observer, open-uri, open3, openssl, optparse, ostruct, power_assert, pp, prettyprint, prime, pstore, psych, psych, racc, rake, readline-ext, reline, repl_type_completor, resolv, rexml, rinda, rss, ruby2_keywords, rubygems-mirror, scanf, sdbm, securerandom, shell, shellwords, singleton, stringio, strscan, syck, sync, syslog, tempfile, test-unit-ruby-core, time, timeout, tmpdir, tracer, tsort, uri, weakref, webrick, win32-registry, yaml, zlib

Found by reading each caller's min_version and runs-on; erb and pathname have no min_version and aren't counted.

Would you rather roll this out yourselves across the org, handle it in ruby_versions.yml somehow, or should I send the one-line change to some of these repositories?

Activity

  1. hsbt commented on Oct 31, 2026

    @hsbt
    Member

    I'd rather fix this in ruby-builder, so I opened ruby/ruby-builder#31 to build Ruby 3.1 and older for ubuntu-26.04. Please follow that PR instead of sending the one-line change.

  2. czj commented on Oct 31, 2026

    @czj
    Author

    Thanks @hsbt, fixing it in ruby-builder is much better than patching 87 workflows. I'll follow ruby/ruby-builder#31 and won't send the one-liners. Could this be closed once it lands?

  3. added a commit that references this issue on Nov 3, 2026
  4. hsbt commented on Nov 3, 2026

    @hsbt
    Member

    setup-ruby now provides Ruby 2.3 through 3.1 on ubuntu-26.04, with the fix landing in ruby-build (rbenv/ruby-build#2649 and rbenv/ruby-build#2651) rather than ruby/ruby-builder#31. Ruby 2.2 and older won't be built, and ruby2_keywords, the only caller testing them, now runs on ubuntu-24.04 (ruby/ruby2_keywords#68). Thanks for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions