AbstractController::DoubleRenderError Ruby / Rails Origin: Application & API Last updated 5 Nov 2026

Rails: AbstractController::DoubleRenderError (Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and at most once per action)

An action called render/redirect_to more than once.

Exact message you may see AbstractController::DoubleRenderError (Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and at most once per action)Render and/or redirect were called multiple times in this actionDoubleRenderError Rails
Seen on: Ruby

Meaning

Add and return/return after the first render/redirect (redirect_to x and return), restructure conditionals, and check before_action filters that render or redirect and then let the action continue (a callback that renders halts the chain, but only if it renders/redirects itself).

Common causes

  • redirect_to then continued execution in the action
  • Missing return after render in a guard clause
  • Callback renders and the action also renders
  • Rescue block rendering after a previous render
  • Implicit render plus explicit render

⚡ Quick fix

  1. return redirect_to(root_path) unless user
  2. Use if/else branches with one render each
  3. Check callbacks (before_action) for render/redirect

Detailed fix by platform

Rails

  1. redirect_to root_path and return if @user.nil?

How to diagnose

  1. Calls — How many renders?
  2. Guard — return?
  3. Callback — Renders?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Application & API. Errors that are often confused with or caused by this one (click to open):

ActionController::ParameterMissing: param is missing or the value is empty — Rails: ActionController::ParameterMissing: param is missing or the value is empty: user (Ruby / Rails)ActionController::Par…ActionController::UnknownFormat — Rails: ActionController::UnknownFormat — UsersController#show is missing a template for this request format and variant (Ruby / Rails)ActionController::Unk…ActionView::MissingTemplate: Missing template — Rails: ActionView::MissingTemplate (Missing template users/show, application/show with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder]}) (Ruby / Rails)ActionView::MissingTe…ActiveRecord::AssociationTypeMismatch — Rails: ActiveRecord::AssociationTypeMismatch: User(#1234) expected, got "42" which is an instance of String(#5678) (Ruby / Rails)ActiveRecord::Associa…ActiveRecord::ConnectionNotEstablished — Rails: ActiveRecord::ConnectionNotEstablished: No connection pool for 'ActiveRecord::Base' found (Ruby / Rails)ActiveRecord::Connect…ActiveRecord::Deadlocked: PG::TRDeadlockDetected — Rails: ActiveRecord::Deadlocked: PG::TRDeadlockDetected: ERROR: deadlock detected (Ruby / Rails)ActiveRecord::Deadloc…ActiveRecord::IrreversibleMigration — Rails: ActiveRecord::IrreversibleMigration — This migration uses remove_column without a type; db:rollback can't reverse it (Ruby / Rails)ActiveRecord::Irrever…AbstractC…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.