A Rails 8.1 upgrade is now the safe default for any app still on Rails 7.2 or 8.0. Rails 7.2 stopped receiving security fixes on August 9, 2026, and Rails 8.0 stops on November 7, 2026. Rails 8.1 is the only release series that gets security fixes beyond that date (until October 10, 2027).
This guide shows the upgrade path I recommend, and I ran it against a small throwaway app (7.2, then 8.0, then 8.1). It covers the support dates, the order of steps, what app:update changes, the new framework defaults, what Rails 8.1 removed or deprecated, and a checklist to run before you deploy. It is written for Rails developers doing the work and for the CTOs and product owners who need to know how big the job is.
I ran the upgrade steps in this article on a minimal app (one model, one test, SQLite) with Ruby 3.3.6: Rails 7.2.4, then 8.0.5.2, then 8.1.4.1. A tiny app proves the commands and the generated files, not that your large app will upgrade without changes. The removals and deprecations come from the official release notes, not from my test app.
Why upgrade now: the support dates
Rails supports each minor release series for one year with bug fixes and two years with security fixes. The Rails maintenance policy, checked on November 6, 2026, lists:
| Series | Bug fixes until | Security fixes until |
|---|---|---|
| 8.1.x | October 10, 2026 (ended) | October 10, 2027 |
| 8.0.x | May 7, 2026 (ended) | November 7, 2026 |
| 7.2.x | ended | August 9, 2026 (ended) |
The 7.2 date comes from the October 29, 2025 release announcement, which also extended Rails 8.0 support by six months because 8.1 shipped more than six months after 8.0.
What this means in practice:
- Rails 7.2 and older: no more security releases. If a vulnerability is found, you patch it yourself or you stay exposed.
- Rails 8.0: security releases stop tomorrow. Treat 8.0 as a stop on the way to 8.1, not a destination.
- Rails 8.1: the current release series. The latest version on RubyGems at the time of writing is 8.1.4.1, published on November 4, 2026.
If your app is older than 7.2, the same advice holds, but you take more steps (see Apps older than Rails 7.2).
Check your Ruby version first
Rails 8.0 and 8.1 require Ruby 3.2.0 or newer, according to the Upgrading Ruby on Rails guide. Rails 7.2 requires 3.1.0 or newer, so a 7.2 app can still be on a Ruby that Rails 8 rejects.
Ruby has its own support calendar. According to the Ruby branches data, Ruby 3.2 reached end of life on April 1, 2026, and Ruby 3.3 is in security maintenance with an expected end of life on March 31, 2027. Ruby 3.4 and 4.0 are in normal maintenance.
So the Rails 8.1 minimum is itself end-of-life. I recommend moving to Ruby 3.4 or newer before the Rails upgrade, and shipping that as its own deploy. The official guide gives the same advice: upgrade Ruby and Rails separately, Ruby first. If something breaks, you then know which change caused it.
The path: one minor version at a time
The official guide says to move one minor version at a time so deprecation warnings can tell you what to fix. For each hop, the process is:
- Make sure the test suite passes.
- Move to the latest patch of your current version.
- Fix tests and deprecation warnings.
- Move to the latest patch of the next minor version, and repeat.
From 7.2 that means 7.2 (latest patch), then 8.0 (latest patch), then 8.1 (latest patch). The Rails 8.1 release notes also say to upgrade to 8.0 first and confirm the app runs before moving to 8.1. If you are already on 8.0, you only need the last hop.
Each hop uses the same four commands:
# 1. Pin the next minor version in the Gemfile, e.g. gem "rails", "~> 8.1.4"
bundle update rails
# 2. Update config files and bin scripts (interactive)
bin/rails app:update
# 3. Run the suite and read every deprecation warning
bin/rails test # or: bundle exec rspec
# 4. Deploy, then repeat for the next versionWhat app:update changed in my test
After pinning ~> 8.0.5 and running bundle update rails, the existing test passed before I touched any config. Then bin/rails app:update created config/initializers/new_framework_defaults_8_0.rb and bin/dev, added public/400.html, and modified config/environments/*.rb, config/puma.rb, bin/setup, config/initializers/assets.rb and the static error pages.
The 8.1 hop did the same kind of work and also created config/ci.rb and bin/ci (the new local CI runner, covered below) and config/initializers/new_framework_defaults_8_1.rb.
I passed
--forceso the task would run non-interactively in a throwaway app. Don’t do that in a real app.--forceoverwrites files likeconfig/environments/production.rbandconfig/puma.rbwithout asking. Run the task interactively, or commit first and reviewgit diffafterwards. For each conflict, pressdto see the diff and keep your own settings (hosts, SSL, cache store, queue adapter).
Adopt the new framework defaults gradually
Rails keeps your app on the old behavior until you change config.load_defaults in config/application.rb. The update task writes a new_framework_defaults_X_Y.rb file in which every new default is commented out. You uncomment them one at a time, deploy, and when all of them are on, delete the file and raise load_defaults.
These are the settings the generated files listed in my test:
Rails 8.0 defaults (new_framework_defaults_8_0.rb):
| Setting | New value |
|---|---|
active_support.to_time_preserves_timezone |
:zone |
action_dispatch.strict_freshness |
true (only If-None-Match is considered when both conditional headers are sent) |
Regexp.timeout |
1 second, to limit regular-expression denial of service |
Rails 8.1 defaults (new_framework_defaults_8_1.rb):
| Setting | New value |
|---|---|
action_controller.escape_json_responses |
false |
active_support.escape_js_separators_in_json |
false |
active_record.raise_on_missing_required_finder_order_columns |
true |
action_controller.action_on_path_relative_redirect |
:raise |
action_view.render_tracker |
:ruby |
action_view.remove_hidden_field_autocomplete |
true |
Three of these deserve a closer look before you enable them:
Regexp.timeout = 1raisesRegexp::TimeoutErrorfor any regular expression that takes over a second. That is a security win, but search your code for expensive regexes that run on user input or large text, and add tests.action_on_path_relative_redirect = :raisemakesredirect_to "example.com"orredirect_to "@attacker.com"raiseUnsafeRedirectError. It closes an open-redirect hole, but any code that redirects to a URL built from user input can start failing. Set it to:logfirst to find the callers without breaking requests.raise_on_missing_required_finder_order_columnsturns the deprecation forfirst,secondand friends on a model with no usable ordering column into an error. Models with a normal integer primary key are not affected.
Flipping the setting itself is one line. In my test I changed config.load_defaults 7.2 to 8.1, deleted both defaults files, and the test still passed:
# config/application.rb
config.load_defaults 8.1On a real app, don’t flip it until each default has run in production by itself.
What Rails 8.1 removed and deprecated
The Rails guide’s “Upgrading from Rails 8.0 to Rails 8.1” section is short. It lists one change: Active Record now sorts table columns alphabetically in schema.rb, so dumps are consistent across machines. (In my tiny app, the only difference in schema.rb after the upgrade was the version in the header, ActiveRecord::Schema[8.1].) If you need exact column order, use structure.sql.
The Rails 8.1 release notes hold the rest. These are the items most likely to hit a real app, quoted from the notes:
Removed in 8.1
- The built-in
SuckerPunchActive Job adapter. Use the adapter that ships with thesucker_punchgem. Benchmark.msin Active Support. It now lives in thebenchmarkgem.- Adding a
Timeto anActiveSupport::TimeWithZone, and passing aTimetoTime#since. to_timepreserving the system local time. It now always preserves the receiver’s timezone.- Support for semicolons as a query string separator, and for skipping leading brackets in parameter names. A request like
foo=bar;baz=quuxnow parses as a single parameter. - Routing one route to multiple paths.
- The SQLite3 adapter’s
:retriesoption and the MySQL:unsigned_floatand:unsigned_decimalcolumn methods. bin/rake stats,STATS_DIRECTORIESandrails/console/methods.rb. Usebin/rails stats.
Deprecated in 8.1 (fix these now, they break in 8.2)
- Order-dependent finders such as
firstwithout anorderon a model with no ordering columns. ActiveRecord::Base.signed_id_verifier_secret, in favor ofRails.application.message_verifiers.insert_allandupsert_allwith unpersisted records in associations.WITH,WITH RECURSIVEandDISTINCTwithupdate_all.- The built-in
sidekiqActive Job adapter, which is now provided by thesidekiqgem. Make sure your Sidekiq version is current. String#mb_charsandActiveSupport::Configurable.
From the 8.0 hop (the Rails 8.0 release notes)
enumwith keyword arguments was removed. If you still writeenum status: { draft: 0 }on Rails 7.2, you get a deprecation warning today and an error on 8.0. The positional form works on both:enum :status, { draft: 0, sent: 1, paid: 2 }. That is the form my test app used.config.active_record.warn_on_records_fetched_greater_thanandallow_deprecated_singular_associations_namewere removed.
The upgrade guide’s 7.2 to 8.0 section only links to the 8.0 release notes, so read those notes’ “Removals” lists for each framework before the 8.0 hop.
New in Rails 8.1 (optional once you are on it)
None of these needs adopting during the upgrade, but they are why 8.1 is worth being on. All are from the release notes:
- Active Job Continuations: a long job can be split into steps, and after a restart it continues from the last completed step instead of starting over. The release notes call this especially useful with Kamal, which gives job containers thirty seconds to shut down by default. If you run jobs on Solid Queue, this is the feature to try first.
- Structured event reporting:
Rails.event.notify("user.signup", user_id: 123)emits structured events to subscribers you register, which is easier to process than log lines. - Local CI:
config/ci.rbandbin/cidefine CI steps that run on a developer machine. - Markdown rendering, command-line credentials fetching, deprecated associations (
has_many :posts, deprecated: truereports every use) and registry-free Kamal deployments. If you deploy with Kamal, see my Kamal for Rails 8 guide.
Before you deploy: a checklist
- The test suite passes on the new version with no deprecation warnings left (set
config.active_support.deprecation = :raiseintest.rbto enforce it). - Ruby is 3.4 or newer, and deployed separately from the Rails bump.
-
bundle outdatedshows no gem that blocks Rails 8.1. Check the gems that patch Rails internals (auth, admin panels, background jobs, search) in their changelogs. - You reviewed
git diffof everythingapp:updatechanged, and kept your production settings. - The new framework defaults are enabled one at a time, each in its own deploy.
- You searched for
redirect_tocalls that take user input, expensive regexes, andfirst/lastcalls on models without a primary key. - Your CI image and production image build with the new Ruby, and
bin/rails db:migrateworks against a copy of production data. - You have a rollback plan: the previous Gemfile.lock, the previous image, and migrations that don’t destroy data.
Apps older than Rails 7.2
If you are on Rails 6 or earlier, the official advice does not change: one minor version at a time. There is no shortcut from 6.1 to 8.1, because each hop removes the code that the previous hop deprecated. Expect a longer project, with Ruby upgrades in between (Rails 7.0 and 7.1 need Ruby 2.7 or newer, Rails 7.2 needs 3.1 or newer). For the effort of a big upgrade, the cost drivers are test coverage, the number of outdated gems, and how much code patches Rails internals. If you want a second opinion on those before you commit to a plan, my legacy Rails modernization work starts with an audit that sizes the job. For performance work after the upgrade, see how to scale a Ruby on Rails application.
The spoke guides around this release: Solid Queue, Solid Cache, structured event reporting, Active Job continuations, Kamal and scaling a Rails app. If security is the driver, my Rails security update covers the November 2026 advisories; and don’t skip Ruby 4.0.
Conclusion
The Rails 8.1 upgrade is mostly mechanical: pin the next version, run app:update, read the deprecation warnings, adopt the new defaults one by one, and deploy each hop on its own. The risk sits in your own code and gems, not in the commands, which is why test coverage matters more than any trick. Start now if you are on 7.2 (already unsupported) or 8.0 (unsupported after November 7, 2026).
If your app is stuck on an old Rails or Ruby version, or you don’t have the tests to upgrade safely, I can take the upgrade from audit to deployment, with each hop shipped separately. Send me a short brief and book a discovery call and I will tell you how large the job is.
Frequently asked questions
Is Rails 8.0 still supported?
Only for security fixes, and only until November 7, 2026, according to the Rails maintenance policy. Its bug-fix window ended on May 7, 2026. After November 7, 2026, Rails 8.0 receives no releases.
Is Rails 7.2 still supported?
No. Rails 7.2 security support ended on August 9, 2026, according to the Rails team’s October 29, 2025 announcement.
Can I upgrade from Rails 7.2 directly to 8.1?
The official guide recommends going one minor version at a time, and the 8.1 release notes say to upgrade to 8.0 first. You can change the Gemfile to 8.1 in one step, but you lose the deprecation warnings that tell you what to fix. I recommend 7.2, then 8.0, then 8.1, and deploying each.
Which Ruby version does Rails 8.1 need?
Ruby 3.2.0 or newer. Ruby 3.2 is already end-of-life, so I recommend Ruby 3.4 or newer.
What does bin/rails app:update do?
It compares your config and bin files with what a new app of the target Rails version would generate, and lets you merge the differences. It also creates the new_framework_defaults_X_Y.rb file that lets you adopt new defaults gradually. Run it interactively and review the diff.
Do I have to change config.load_defaults?
Not immediately. Your app keeps the old defaults until you change it. Enable the defaults in the new_framework_defaults file one at a time, and raise load_defaults only when all of them are on.
How long does a Rails upgrade take?
It depends on test coverage, how far behind the app is, and how many gems and monkey patches touch Rails internals. I won’t guess a number without seeing the code. A single hop on a well-tested app is typically a small, reviewable change, while several hops across old versions is a project.


