Ruby Error
ActionView::MissingTemplate
ActionView::MissingTemplate is raised when Rails cannot find a view template for the current action. This happens when render is called (explicitly or implicitly) but the template file doesn't exist.
Common causes
- Template file not created for action
- Template in wrong directory
- Wrong file extension (.html.erb vs .erb)
- Partial name typo in render call
- Missing format-specific template
How to fix it
- Create the missing template file
- Check template path matches controller/action
- Verify file extension matches format
- Use explicit render path if needed
- Add template for requested format
Example
ActionView::MissingTemplate example
# Error when template missing
# => ActionView::MissingTemplate: Missing template users/show
# Fix by creating app/views/users/show.html.erb
# Or render explicitly
def show
@user = User.find(params[:id])
render 'shared/user_profile' # explicit path
end
# For API endpoints, skip template
def show
@user = User.find(params[:id])
render json: @user
end Track ActionView::MissingTemplate with Checkend
Checkend automatically captures ActionView::MissingTemplate errors in your Ruby application with full context:
- Complete backtrace with syntax highlighting
- Request context (URL, params, headers)
- Automatic grouping of similar errors
- Instant notifications when errors occur
Related errors
ActionController::UnknownFormat
ActionController::UnknownFormat is raised when a request asks for a format (like JSON or XML) that t...
ActionView::Template::ErrorActionView::Template::Error wraps errors that occur during template rendering. The original error (N...
NameErrorNameError is raised when Ruby encounters a name (variable, constant, or method) that it doesn't reco...
Stop debugging in production
Get full error context and fix issues faster with self-hosted error tracking.