This project is archived and is in readonly mode.

#4445 ✓invalid
Luigi Montanez

In production mode, the stock 404.html and 500.html don't get rendered

Reported by Luigi Montanez | April 20th, 2010 @ 04:59 PM

To reproduce, generate a clean app off 3.0.0.beta3:

$ rails testapp
$ cd testapp/
$ rails server -e production

Then, navigate to http://localhost:3000/junk. I expect the white background/red text of public/404.html, but instead action_dispatch/middleware/templates/rescues/routing_error.erb gets rendered. Combine this problem with #4444, and there's no clean way to have custom 404 pages.

Comments and changes to this ticket

  • Dan Pickett

    Dan Pickett April 21st, 2010 @ 01:34 AM

    • Assigned user set to “Ryan Bigg”


    it looks like you made these requests locally. By default, Rails will not serve the static error pages for local requests.

    You can try two things:

    If you access your actual network ip (ie 192.168.x.x) and your nonexistent path you should see the expected 404 page

    If you attempt to hit your missing path on your server from another system on your network you should see the expected 404 page

  • Ryan Bigg

    Ryan Bigg April 21st, 2010 @ 01:39 AM

    • State changed from “new” to “invalid”

    Correct, it detects a local_request? and will serve the familiar stacktrace pages.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>