CI: drop EOL Ruby 3.2 / Rails 7.1, cover Ruby 4.0 and Rails 8.1#221
Merged
Conversation
Rails 8.1's generated ApplicationController calls stale_when_importmap_changes, a macro from importmap-rails. The Active Admin 3 asset setup uses Sprockets, not importmap, so the macro is undefined and the controller raised NameError at boot, failing every feature spec on Rails 8.1. Strip the line from the generated controller. No-op on Rails < 8.1 and harmless on the AA 4 path.
Ruby 3.2 reached EOL on 2026-03-31 and Rails 7.1 on 2025-10-01, so remove them from the matrix. Add the current stable releases Ruby 4.0 and Rails 8.1 (8.1.x via the existing ~> pin), keeping Rails 7.2/8.0 which are still in security support. Exclude Active Admin 3.2.0 on Rails 8.1 as well, since it predates Rails 8 support, and add a Rails 8.1 cell to the Active Admin 4 set. Bump the gemspec required_ruby_version to >= 3.3.0 and move the Gemfile dev defaults to Rails 8.0.0 + Active Admin 3.5.1 (the previous 7.1.0 default is EOL; 3.2.0 cannot run on Rails 8).
The earlier gsub_file approach could not work: on Rails 8.1 rake setup boots the app during `rails generate model` (the gem's bundle has no importmap-rails), so the generated ApplicationController's stale_when_importmap_changes macro raised NameError and aborted setup before the gsub ran. Drop the gsub and pass --skip-javascript on the non-v4 path so the macro is never generated. Verified: fresh rake setup + full suite on Ruby 3.3 / Rails 8.1.3 / AA 3.5.1 / SQLite is green (58 examples, 0 failures).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refreshes the supported-version matrix to current upstream reality (checked against endoflife.date on 2026-06-15).
Removed — end of life
Added — current stable
Rails 7.2 (security until 2026-08-09) and 8.0 (security until 2026-11-07) are kept — still supported, not EOL.
Changes
.github/workflows/test.yml: matrix is now Ruby3.3 / 3.4 / 4.0× Rails7.2.0 / 8.0.0 / 8.1.0. Active Admin 3.2.0 is excluded on Rails 8.1 (as it already was on 8.0 — it predates Rails 8 support), and a Rails 8.1 cell is added to the Active Admin 4 set.active_admin_import.gemspec:required_ruby_version>= 3.1.0→>= 3.3.0.Gemfile: dev defaults moved from Rails 7.1.0 + AA 3.2.0 (EOL / incompatible with Rails 8) to Rails 8.0.0 + AA 3.5.1.spec/support/rails_template.rb: stripstale_when_importmap_changesfrom the generatedApplicationController. Rails 8.1 emits this importmap-rails macro by default, but the AA 3 test app uses Sprockets, so without this the controller raisedNameErrorat boot and every feature spec failed on Rails 8.1. No-op on Rails < 8.1; harmless on the AA 4 path.Verification
Full suite green locally on the new top combo Ruby 3.3 / Rails 8.1.3 / AA 3.5.1 / SQLite → 58 examples, 0 failures (coverage 99.3%). The Ruby 4.0 and Active Admin 4 / Rails 8.1 cells are exercised by CI on this PR.