Topic: [SOLVED] 500 error

I am trying to create the expetion pages
like the 500 error page

and i was wondering how i can create a 500 error and where would i put the html that will tell whom ever is viewing the site that there are a 500 error

Last edited by moiseszaragoza (2012-05-16 13:43:31)

Re: [SOLVED] 500 error

I'm sorry but I have removed the previous replies to you as they were totally and utterly wrong.
lol! you not a real programmer then smile Most programmer want to get rid of them not create them smile
Sorry, that made me larf.

You don't need to create an error to see the page, just navigate to it in your browser (http://localhost:300/500.html)
To find the files just look in the your_app_root/public folder and you will see a bunh of the default rails files (400, 500, index etc...)

As above, you don't need to do this but it answers the question you asked
Creating a 500 error is dead simple. Just reference a variable that doesn't exist in a view
Something like

<%= @something_that_doesn't_exist %>

Chuck that into an index.html.erb file and visit the page
run server in production mode (development mode will just get you the error output) then you will see the 500 page.

What you want and what you need are too often not the same thing!
When your head is hurting from trying to solve a problem, stop standing on it. When you are the right way up you will see the problem differently and you just might find the solution.
(Quote by me 15th July 2009)

Re: [SOLVED] 500 error

Thanks that was really helpful

and i agree we all want to never have to see a 500 err page. but my task was when the page happens it needs to match the rest of the site

thank you for the help