I followed the tutorial here to create custom error pages:
http://wearestac.com/blog/dynamic-error-pages-in-rails
When I got to /404, /500, and /424, I can view my custom error pages locally. However, after deploying with Heroku, I'm finding that my custom error pages aren't loading and, instead, the app is defaulting to the static 404.html and 500.html pages. How can I go about fixing this error?
I also tried the fix suggested in this post, but it didn't work for me:
User-friendly error pages not displaying in production environment
routes.rb
%w( 404 422 500 ).each do |code|
get code, :to => "errors#show", :code => code
end
errors_controller.rb
class ErrorsController < ApplicationController
def show
render status_code.to_s, :status => status_code
end
protected
def status_code
params[:code] || 500
end
end