I want to design my 404 page in my Rails 3.0.7 app. If I request a non existing page I get the development output
Routing Error
No route matches "/foo"
I tried the following answers in:
How to test 500.html in rails development env?
application_controller:
def local_request?
false
end
development.rb:
config.consider_all_requests_local = false
development.rb:
config.action_view.debug_rjs = false
and I also started my app with: RAILS_ENV=production rails s RAILS_ENV=production passenger start
None of it worked.I love how rails makes complicated tasks very simple. But it's really frustrating how really simple things turn out tu be overwhelmingly difficult, impossible to debug and you end up hacking on remote servers to work around it..
Has anyone had this problem before?
If your error pages are static you can simply go to http://localhost:3000/404.html, http://localhost:3000/500.html, etc.
Best idea I've come up with so far is to run the server in production mode locally.
rails s -e production
cheers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With