ActionView::MissingTemplate: Missing template Ruby / Rails Origin: Application & API Last updated 5 Nov 2026

Rails: ActionView::MissingTemplate (Missing template users/show, application/show with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :raw, :ruby, :jbuilder]})

The action tried to render a view that doesn't exist for the requested format/handler.

Exact message you may see ActionView::MissingTemplate (Missing template users/show, application/show with {:locale=>[:en], :formats=>[:html]})Missing template users/showActionView::MissingTemplate: Missing partial shared/_headerActionController::MissingExactTemplate: UsersController#show is missing a template for request formats: text/htmlMissing template with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :jbuilder]}
Seen on: Ruby

Meaning

Create app/views/users/show.html.erb (matching controller/action names), or render explicitly (render :other, render json:). Check the file extension (.html.erb), the folder naming (plural), partial names start with _, and API-only apps lacking a renderer (render json:).

Common causes

  • View file missing or misnamed
  • Wrong extension/handler (.erb vs .haml gem missing)
  • API action with no explicit render (expects 204 or JSON)
  • Partial name without underscore
  • Wrong controller path (namespaced)

⚡ Quick fix

  1. Create the template with the right path/name
  2. render json: / head :no_content for API actions
  3. Verify gems for handlers (haml, slim, jbuilder)

Detailed fix by platform

Rails

  1. ls app/views/users and bin/rails routes -c users

How to diagnose

  1. Path — Template exists?
  2. Format — html/json?
  3. Handler — Gem present?

🔧 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):

AbstractController::DoubleRenderError — 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) (Ruby / Rails)AbstractController::D…ActionController::RoutingError: No route matches — Rails: ActionController::RoutingError (No route matches [GET] "/users/new") (Ruby / Rails)ActionController::Rou…ActionController::UnknownFormat — Rails: ActionController::UnknownFormat — UsersController#show is missing a template for this request format and variant (Ruby / Rails)ActionController::Unk…ActionView::Template::Error: undefined method for nil in view — Rails: ActionView::Template::Error (undefined method `name' for nil:NilClass): app/views/users/show.html.erb:3 (Ruby / Rails)ActionView::Template:…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…ActionVie…

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.