Skip to content

Upgrade Rails to 8.1#7019

Draft
stefannibrasil wants to merge 8 commits into
rubyforgood:mainfrom
hexdevs:upgrade-to-rails-8.1
Draft

Upgrade Rails to 8.1#7019
stefannibrasil wants to merge 8 commits into
rubyforgood:mainfrom
hexdevs:upgrade-to-rails-8.1

Conversation

@stefannibrasil

@stefannibrasil stefannibrasil commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

What github issue is this PR for, if any?

This is not ready to be merged. Only after #7017 is live in production to avoid config conflicts.

Closes #7018

What changed, and why?

Following up on #6925, this upgrades Rails to 8.1.

Important things for review

  • The new defaults from config/initializers/new_framework_defaults_8_1.rb look okay to be enabled altogether but if you prefer to enable them individually, let me know.
  • Note that with this version, Rails orders the columns alphabetically in db/schema.rb. This commit shows the updated schema (no functional change, just the reorder changes): 2f013de
  • I had to simplify the random date generation in the seed task due to a date error. More details can be found in this commit. I believe this is a safe choice since this is just a seed task that is ran sporadically.

How is this tested? (please write rspec and jest tests!) 💖💪

  • tested the app locally
  • running tests
  • CI is passing

Followups

Questions

Is it possible to test this on staging/QA first? Please try this out locally and let me know if you run into any issues.

After the upgrade, this test was raising this error:

```
  Failure/Error: ActiveRecord::Tasks::DatabaseTasks.load_seed

     ArgumentError:
      cannot load complex into simple
     # ./db/seeds/db_populator.rb:143:in 'block in DbPopulator#create_cases'
     # ./db/seeds/db_populator.rb:137:in 'Integer#times'
     # ./db/seeds/db_populator.rb:137:in 'DbPopulator#create_cases'
```

Keeping the date to a simpler rand generation solves
the problem.
@github-actions github-actions Bot added dependencies Touches dependency files ruby Touches Ruby code db Touches database schema or migrations labels Jun 18, 2026
@stefannibrasil stefannibrasil changed the title Upgrade to rails 8.1 Upgrade Rails to 8.1 Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

db Touches database schema or migrations dependencies Touches dependency files ruby Touches Ruby code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade Rails from 8.0 to 8.1

1 participant