Custom error with with rails and mongrel

Custom error with with rails and mongrel

Posted by: damu
Posted on: 2008-05-29 14:46:00

We had custom pages for 500 and 404 but when we changed from fast-cgi to mongrel, it didn't work anymore. I try with .htaccess and ErrorDocument, but nothing happened. What must I do to show a custom html page for 500 and 404 errors? Thanks!

Re: Custom error with with rails and mongrel

Posted by: sdayman
Posted on: 2008-05-29 16:31:00

You can create your own pages:
http://wiki.dreamhost.com/Creating_custom_error_pages

-Scott

Re: Custom error with with rails and mongrel

Posted by: damu
Posted on: 2008-05-29 17:00:00

I saw this page but it didn't work. I try setting the error pages name with the default values and didn't work. Then I try setting in the .htaccess with ErrorDocument and didn't work. I don't know what I'm missing... :-(

Re: Custom error with with rails and mongrel

Posted by: sdayman
Posted on: 2008-05-29 17:19:00

I suspect there's something in your .htaccess file that's interfering with this. For an experiment, rename it to .htaccess.old and see if you can get your custom 404 file (missing.html) to show.

-Scott

Re: Custom error with with rails and mongrel

Posted by: damu
Posted on: 2008-05-29 17:59:00

Yes, if I rename the .htaccess the custom 404 file are shown. Then, if I leave the .htaccess like always, the 404 are redirected to 404.html and the 500 gets a page with "Application error (Rails)". If I see the headers from the server response. I get a 200 not a 500. Any idea? Thanks!!

Tags: custom errorhtml pagehtaccess