Skip to content

Exclude rack 3.2.6 on Ruby 2.5 - #828

Merged
yahonda merged 1 commit into
rails:mainfrom
yahonda:exclude-rack-3-2-6-on-ruby-2-5
Jul 17, 2026
Merged

Exclude rack 3.2.6 on Ruby 2.5#828
yahonda merged 1 commit into
rails:mainfrom
yahonda:exclude-rack-3-2-6-on-ruby-2-5

Conversation

@yahonda

@yahonda yahonda commented Jul 17, 2026

Copy link
Copy Markdown
Member

The Ruby 2.5 CI job currently fails at require time, which blocks #827 and any other pull request:

https://github.com/rails/sprockets/actions/runs/27955713071/job/87812447285?pr=827

rack-3.2.6/lib/rack/utils.rb:149:in `to_h': wrong element type String at 0 (expected array) (TypeError)

rack 3.2.6 added a block form of Array#to_h, introduced in Ruby 2.6, to lib/rack/utils.rb as part of the Forwarded header parser rewrite, while its gemspec still declares required_ruby_version >= 2.4.0. Bundler therefore resolves rack 3.2.6 on Ruby 2.5 and require "sprockets" fails. The weekly runs on the main branch turned from success (2026-07-06) to failure (2026-07-13) for the same reason, so re-running the failed job does not help.

Upstream already restored Ruby 2.4/2.5 compatibility on the 3-2-stable branch (rack/rack#2450, rack/rack@108405e), but no release including the fix is available yet. This change excludes only 3.2.6 on Ruby 2.5, so the next rack release applies automatically.

Verified in a ruby:2.5 container: rack resolves to 3.2.5 and the test suite loads and runs (the failure above happens before any test runs).

rack 3.2.6 added a block form of Array#to_h, introduced in Ruby 2.6,
to lib/rack/utils.rb while its gemspec still declares
required_ruby_version >= 2.4.0. Bundler therefore resolves rack 3.2.6
on Ruby 2.5 and requiring sprockets fails:

    rack-3.2.6/lib/rack/utils.rb:149:in `to_h': wrong element type
    String at 0 (expected array) (TypeError)

https://github.com/rails/sprockets/actions/runs/27955713071/job/87812447285?pr=827

Upstream restored Ruby 2.4/2.5 compatibility on the 3-2-stable branch
(rack/rack#2450, commit 108405ea9fec), but no release including the fix
is available yet. Excluding only 3.2.6 lets Ruby 2.5 pick up the next
rack release automatically.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@yahonda
yahonda merged commit 2fd6e75 into rails:main Jul 17, 2026
15 checks passed
@yahonda
yahonda deleted the exclude-rack-3-2-6-on-ruby-2-5 branch July 17, 2026 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant