Skip to content

Web Development · Backend

Rails 8.0 End of Life: How to Upgrade to Rails 8.1

Rails 8.0 lost security support on November 7, 2026. Upgrade to 8.1, covered until October 2027. What breaks, which new defaults to flip, and in what order.

Abhishek Gupta

Abhishek Gupta

12 min read

A paper-cut red locomotive rolling off a rusted, weed-covered track onto bright new rails among layered paper hills

Sponsored

Share

Rails 8.0 went out of support thirteen days ago. Its security window closed on November 7, 2026, two years after 8.0 shipped, and the final patch, 8.0.5.2, landed on RubyGems a few days before the cutoff. If you still run 8.0 in production, upgrade to Rails 8.1, specifically 8.1.4.1 or whatever the newest 8.1 patch is when you read this. It’s one of the smaller minor-version jumps Rails has had.

The dates here come from the Rails maintenance policy and endoflife.date. The breaking changes come from the 8.1 release notes and the per-framework changelogs at the v8.1.4.1 tag, which turn out to be more accurate than the upgrade guide on one point (the schema ordering story further down).

Rails 8.0 end of life: what stopped on November 7

Rails 8.0 gets no more releases. Under the Rails maintenance policy, a minor series receives bug fixes for one year and security fixes for two. For 8.0 the bug fixes stopped on May 7, 2026 and the security fixes on November 7, 2026. A vulnerability reported today gets a patched 8.1 release and nothing for 8.0.

Your app keeps booting. The risk is the next Action Pack or Active Storage advisory, which will name a fixed 8.1 version and leave you to upgrade under pressure or backport the patch yourself.

SeriesReleasedBug fixes untilSecurity fixes untilVerdict
7.2Aug 9, 2024Aug 9, 2025Aug 9, 2026 (ended)Two hops behind: 7.2 to 8.0 to 8.1
8.0Nov 7, 2024May 7, 2026Nov 7, 2026 (ended)Upgrade now
8.1Oct 22, 2025Oct 10, 2026Oct 10, 2027Target
8.2not releasedEdge guides only, no gem yet

Bar chart of Rails and Ruby support windows: Rails 7.2 ended August 9, 2026, Rails 8.0 ended November 7, 2026, Rails 8.1 has security fixes until October 10, 2027; Ruby 3.2 ended March 31, 2026, Ruby 3.3 runs to March 31, 2027 and Ruby 3.4 to March 31, 2028

Read the 8.1 row carefully. Its bug-fix year already ended on October 10, so 8.1 is security-only as of today. That happens whenever the next minor hasn’t shipped yet, and there’s no 8.2 gem on RubyGems as of today. It means 8.1 is a place to stand for the next several months, not for two years. When 8.2 ships, the deprecations below are its removal list, so clearing them now pays twice.

Check your Ruby version before you touch Rails

Rails 8.1 declares required_ruby_version >= 3.2.0, the same floor as 8.0. So the Rails bump doesn’t force a Ruby upgrade. Ruby’s own calendar might, though:

RubyReleasedSecurity support until
3.2Dec 25, 2022Mar 31, 2026 (ended)
3.3Dec 25, 2023Mar 31, 2027
3.4Dec 24, 2024Mar 31, 2028
4.0Dec 25, 2025Mar 31, 2029

An app on Rails 8.0 and Ruby 3.2 is running two unsupported runtimes at once. Fix both, but not in the same deploy. The Rails upgrade guide says to upgrade Ruby and Rails separately, and that matches the advice in our PHP 8.2 end-of-life guide: when production misbehaves, you want one suspect.

Ruby 3.4 is the conservative target, with security fixes into 2028. Ruby 4.0 has a year longer, but check every gem with a C extension in your Gemfile.lock (database drivers, image processing, nokogiri, anything that compiles) before you pick it. Ruby 3.3 works, but you’d be repeating this exercise in March.

How to upgrade from Rails 8.0 to 8.1, step by step

  1. Get on the last 8.0 patch, 8.0.5.2, and make the test suite and logs free of deprecation warnings.
  2. Bump Rails to ~> 8.1.4 and run bundle update rails.
  3. Run bin/rails app:update and review every file it wants to change.
  4. Fix the removals listed in the next section until boot and tests pass.
  5. Deploy with config.load_defaults 8.0 still in place.
  6. Flip the six new 8.1 defaults over a few deploys, then set load_defaults 8.1.

Step 1 does most of the work. Everything Rails 8.1 removed was deprecated in an earlier release, so an app with a clean deprecation log is nearly there. Make them errors in test for a day:

# config/environments/test.rb
config.active_support.deprecation = :raise

For step 2, pin to the patch series rather than the minor, so you don’t pick up 8.1.0’s bugs:

# Gemfile
gem "rails", "~> 8.1.4"
bundle update rails
bundle exec rails -v   # Rails 8.1.4.1 or later

If bundle update refuses, it names the gem holding Rails back, usually one pinned to < 8.1 in its gemspec.

Step 3 is interactive. bin/rails app:update walks through config files, binstubs and initializers and asks before overwriting each one. Set THOR_MERGE to your merge tool so you can keep your own changes instead of choosing all-or-nothing per file:

THOR_MERGE="code --wait --merge" bin/rails app:update

It also generates config/initializers/new_framework_defaults_8_1.rb, which is the subject of step 6.

What breaks between Rails 8.0 and 8.1

The upgrade guide’s 8.0-to-8.1 section has a single item. The real list lives in the release notes and changelogs, ordered here by how likely each is to hit a typical app.

Active Job: the transaction-commit setting and the Sidekiq adapter

Rails 7.2 added a global config.active_job.enqueue_after_transaction_commit with values like :never, :always and :default. That global config was deprecated before 8.1, and 8.1 removes both the config and the symbol values. What’s left is a boolean you set per job class:

# Remove from config/application.rb:
# config.active_job.enqueue_after_transaction_commit = :always

class ApplicationJob < ActiveJob::Base
  # Wait for the surrounding transaction to commit before enqueuing,
  # so the worker never loads a record that isn't visible yet.
  self.enqueue_after_transaction_commit = true
end

The built-in :sidekiq adapter is deprecated too. The Active Job changelog says to upgrade to Sidekiq 7.3.3 or later, which ships its own adapter, so the fix is a gem bump and not a code change. The internal Sucker Punch adapter is already gone; add the sucker_punch gem, which carries its own. If you’re on Solid Queue, none of this applies. And if you’re choosing a backend again anyway, the BullMQ vs Celery vs Sidekiq comparison lays out where Sidekiq still beats the database-backed queue that Rails 8 defaults to.

Active Support: to_time keeps the receiver’s timezone

This one can change output without raising anything. Rails 8.1 removed the old behaviour where to_time converted to the server’s local time. It now always keeps the timezone of the object you call it on, and the config.active_support.to_time_preserves_timezone switch is deprecated.

If your servers run in UTC and your app’s config.time_zone is UTC too, you won’t notice. If they differ, any code that calls .to_time and then formats or compares the result can shift by hours. Search for it, and for the other Active Support removals:

grep -rnE "\.to_time\b|to_time_preserves_timezone|Benchmark\.ms|mb_chars|ActiveSupport::Configurable" \
  app lib config

Benchmark.ms is gone from Active Support (it lives in the benchmark gem now, or use Process.clock_gettime). String#mb_chars and ActiveSupport::Configurable are deprecated, which means they still work on 8.1 and probably won’t on 8.2.

Smaller removals worth a grep each

  • Azure storage. The deprecated :azure Active Storage service is removed. If config/storage.yml has service: AzureStorage, you need another storage service or a third-party adapter gem before you deploy, or uploads stop working.
  • SQLite retries. The :retries option for the SQLite3 adapter is removed. Take it out of database.yml before you boot 8.1.
  • MySQL column helpers. The unsigned_float and unsigned_decimal column methods are removed. Old migrations that call them will fail if anyone runs them from scratch, so check db:schema:load too.
  • Query strings. Action Pack no longer treats ; as a query-string separator. Old clients or webhooks that send a=1;b=2 will see one parameter instead of two.
  • Routes to multiple paths. Support for routing one get line to several paths is removed.
  • bin/rake stats. Removed, along with STATS_DIRECTORIES. Use bin/rails stats.

Active Record deprecations that 8.2 will enforce

These don’t break 8.1, but fix them while you’re in the code. Calling first or last on a relation with no order on a model with no primary key or implicit_order_column is deprecated, and the setting that makes it raise is one of the six new defaults. signed_id_verifier_secret is deprecated in favour of Rails.application.message_verifiers. update_all on a relation that uses WITH, WITH RECURSIVE or DISTINCT now warns, and so does insert_all or upsert_all on unsaved records in an association.

The schema.rb column order: read this before you commit the dump

The upgrade guide’s only 8.0-to-8.1 item says that schema.rb now lists table columns alphabetically, to cut merge conflicts. That shipped in 8.1.0. Then the Active Record changelog for 8.1.4 reverted it, because alphabetical sorting “creates improper production tables when using db:prepare.” In other words, a database built from the dump got its columns in a different physical order than the one built by migrations.

So: if you upgrade straight to 8.1.4 or later, your next db:schema:dump keeps creation order and the diff stays quiet. If a teammate already upgraded to an early 8.1 patch and committed a reshuffled schema.rb, regenerate it on 8.1.4 and commit that. Either way, check the changelog for the patch you’re on before trusting the upgrade guide here, which still describes the alphabetical order as of November 20.

The six new defaults, and which to flip first

new_framework_defaults_8_1.rb lists every behaviour that changes when you move load_defaults to 8.1. Uncomment them gradually, across more than one deploy.

SettingNew valueRisk
action_controller.escape_json_responsesfalseLow. Stops escaping <, > and & in JSON responses. Check before you flip if you put render json: output inside a <script> tag.
active_support.escape_js_separators_in_jsonfalseLow. U+2028 and U+2029 have been legal in JavaScript strings since ES2019.
active_record.raise_on_missing_required_finder_order_columnstrueMedium. Raises MissingRequiredOrderError instead of warning. Run the full suite first.
action_controller.action_on_path_relative_redirect:raiseMedium. redirect_to "example.com" (no leading slash) raises UnsafeRedirectError. Good for security, but grep your redirects.
action_view.render_tracker:rubyLow. A Ruby parser tracks template dependencies for cache digests.
action_view.remove_hidden_field_autocompletetrueLow. Hidden form inputs stop getting autocomplete="off".

Flip the four low-risk ones together if you like. Give the finder-order and redirect settings their own deploys, and watch error tracking for a day after each. Once all six are on, delete the initializer and set config.load_defaults 8.1 in config/application.rb.

What you get once you’re on 8.1

The upgrade isn’t only a security fix. A few 8.1 features earn their keep in client apps right away.

Active Job continuations let a long job resume where it stopped when a deploy restarts the worker, instead of starting over. Kamal gives job containers thirty seconds to shut down by default, which a two-hour CSV import will never fit inside:

class ImportCustomersJob < ApplicationJob
  include ActiveJob::Continuable

  def perform(import_id)
    # Code outside a step runs on every attempt, including resumes.
    @import = Import.find(import_id)

    step :validate do
      @import.validate!
    end

    step :process_rows do |step|
      @import.rows.find_each(start: step.cursor) do |row|
        row.create_customer!
        step.advance! from: row.id
      end
    end

    step :notify
  end

  private

  def notify
    ImportMailer.finished(@import).deliver_later
  end
end

Each completed step is skipped on resume, and step.cursor hands back the last row ID, so the job picks up mid-loop. Make create_customer! idempotent anyway, because the row that was in flight when the worker died will run again.

Deprecated associations are the other quick win for anyone cleaning up an older codebase. Mark has_many :legacy_orders, deprecated: true and Rails reports every use, including indirect ones through includes and nested attributes. Set the mode to :raise in test and you get a precise list of what still depends on it. This pairs well with the checklist for inheriting a codebase from another agency, where finding dead associations is half the battle.

Also new: bin/ci with a config/ci.rb that runs RuboCop, Brakeman, bundler-audit and the tests locally (copy them from a fresh rails new if app:update didn’t add them), and Rails.event.notify, which emits structured events a subscriber can ship to your log pipeline.

If you skipped the 8.0 features too (Solid Queue, Solid Cache, Kamal 2, the authentication generator), our earlier look at Rails 8 in production covers what they replace.

Roll it out in this order

Ruby first, in its own deploy, if you’re still on 3.2. Then Rails 8.1.4.1 with load_defaults 8.0 and every removal above fixed. Then the six defaults, a couple at a time. Any migrations that come out of the cleanup (dropping an Azure-era column, adding the order column a finder needs) should follow the expand-and-contract pattern from the zero-downtime database migrations guide, because a Rails upgrade week is a bad time for a locked table.

The other end-of-life guides this autumn, from Django 6.0 to 6.1 to Python 3.10, had to choose between several supported releases. Rails has one left. Start with config.active_support.deprecation = :raise in test today, and the rest of the list will show itself.

Frequently asked questions

Will my Rails 8.0 app stop working after November 7, 2026?
No. The app runs exactly as before. What ended is maintenance: the Rails core team publishes no more 8.0.x releases, so a security issue reported now is fixed in 8.1 and later only. If you can't upgrade soon, you are responsible for patching 8.0 yourself.
Can I upgrade from Rails 7.2 straight to 8.1?
The Rails upgrade guide recommends moving one minor version at a time, so go 7.2 to 8.0 to 8.1, fixing deprecation warnings at each stop. Rails 7.2 lost security support on August 9, 2026, so a 7.2 app is already a release further behind than an 8.0 one.
Should I wait for Rails 8.2 instead?
No. As of November 20, 2026 there is no 8.2 gem on RubyGems, only draft release notes on the edge guides. Upgrading to 8.1 now closes the security gap, and the 8.0 to 8.1 jump is small. Several 8.1 deprecations also tell you exactly what 8.2 will remove.

Sources

Sponsored

Sponsored

Discussion

Join the conversation.

Comments are powered by GitHub Discussions. Sign in with your GitHub account to leave a comment.

Sponsored