Skip to content

Upgrade Rails from 7.2 to 8.x #6925

@compwron

Description

@compwron

Description

Upgrade Rails from the current ~> 7.2 (locked at 7.2.3.1) to the 8.x series. Rails 8.0 was released in late 2024 and brings Solid Queue / Solid Cache / Solid Cable as defaults, Propshaft, Kamal 2, Authentication generator, and a number of framework deprecations.

https://rubygems.org/gems/rails/versions

The previous Rails upgrade (7.0 → 7.1) was tracked in #5462; we should follow the same incremental approach: 7.2 → 7.3 (if applicable) → 8.0, resolving deprecation warnings before each step.

See: https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#upgrading-from-rails-7-2-to-rails-8-0

Existing gem(s), file(s) needing updating, changing or deleting

  • Gemfile — bump gem "rails", "~> 7.2" to ~> 8.0
  • Gemfile.lock — regenerate via bundle update rails
  • config/application.rb — review config.load_defaults
  • config/environments/*.rb — review framework defaults / new config knobs
  • config/initializers/new_framework_defaults_*.rb — add the 8.0 file via bin/rails app:update, then enable settings one at a time
  • bin/*bin/rails app:update may regenerate binstubs
  • Any deprecation warnings surfaced when running bin/rails spec

New file(s) needing creating

  • config/initializers/new_framework_defaults_8_0.rb (generated by bin/rails app:update)
  • Any new config files generated by bin/rails app:update (review each carefully before committing)

Questions? Join Slack!

We highly recommend that you join us in slack #casa channel to ask questions quickly and hear about office hours (currently Tuesday 5-7pm Pacific), stakeholder news, and upcoming new issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesTouches dependency files

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions