-
-
Notifications
You must be signed in to change notification settings - Fork 198
Upgrade Rails to 7.1 #2250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
olleolleolle
wants to merge
16
commits into
codebar:master
Choose a base branch
from
olleolleolle:rails71
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Upgrade Rails to 7.1 #2250
Conversation
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
This upgrades the gem, and following commits will change configuration, using the "rails app:update" process.
This amended all the configuration files with manually-edited new diffs, getting rid of outdated configuration where known to be outdated. We wish to keep close to the default configuration, to make updates using these diff scripts easy.
Zeitwerk::NameError: expected file /home/runner/work/planner/planner/lib/services/event_calendar.rb to define constant Services::EventCalendar, but didn't
mroderick
reviewed
Aug 6, 2025
In order to avoid Zeitwerk expectations failing.
TODO: see whether we should keep this at all
workaround from hotwired/turbo-rails#512 (comment)'
This was a workaround re: Zeitwerk rules
These files are meant to be used during upgrades, not kept around.
These are meant to be dropped after updating to a version. We are currently setting all of these defaults, using a defaults setting in config/application.rb.
One model needed changing: that callback is run in another order (now: in declared order). One test needed to not require code on its own.
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.
This PR upgrades the code base to use Rails 7.1. It is a part of upgrading Rails to latest stable release. Our method is the recommended "one minor at a time".
The PR is now draft, and will be turned into a regular PR when ready for it.
cc @mroderick.
Errors to fix
Zeitwerk::NameError: expected file /home/runner/work/planner/planner/lib/services/event_calendar.rb to define constant Services::EventCalendar, but didn't # ./vendor/bundle/ruby/3.4.0/gems/zeitwerk-2.7.3/lib/zeitwerk/loader/callbacks.rb:31:in 'Zeitwerk::Loader::Callbacks#on_file_autoloaded'
Unpermitted parameter: :format. Context: { controller: ChapterController, action: show, request: #<ActionDispatch::Request:0x000000012c45bc30>, params: {"controller" => "chapter", "action" => "show", "id" => "apple-touch-icon", "format" => "png"} } Chapter Load (11.6ms) SELECT "chapters".* FROM "chapters" WHERE "chapters"."active" = $1 AND "chapters"."slug" = $2 LIMIT $3 [["active", true], ["slug", "apple-touch-icon"], ["LIMIT", 1]] ↳ app/controllers/chapter_controller.rb:3:in 'ChapterController#show' Completed 404 Not Found in 593ms (ActiveRecord: 49.0ms | Allocations: 118818)
spec/lib/verifier_spec.rb:9
make the Verifier test pass - there is a setting that upgrades the verifier serialization, assess impact of upgrading it1) Verifier generates access_token for an id Failure/Error: expect(Verifier.new(id: 1).access_token).to be_eql('BAhpBg==--30d45b871c77098a0ba79cf27dd532650ca75531') expected `"MQ==--a3487195ba15b69d4aa07b7da0234463b82c96b3".eql?("BAhpBg==--30d45b871c77098a0ba79cf27dd532650ca75531")` to be truthy, got false # ./spec/lib/verifier_spec.rb:9:in 'block (2 levels) in <top (required)>' # ./spec/spec_helper.rb:114:in 'block (2 levels) in <top (required)>'
Cleanup
Findings