An annoying – and silent – thing happened today. I was working on one Rails site, and switched to work on a second one. I fired up the WEBrick server, went to my site, and got…nothing but a blank page.
Looking at the server logs, it was clearly having a 500 error of some sort, but there was nothing to tell me one way or the other what was going on. My development log looked clean (it was, in fact, empty), and I was quite baffled.
A little bit of Googling got me to this great Gotcha’s page on the RubyOnRails wiki:
App Silently Failing (HTTP 500 Errors)
Getting no errors but nothing is loading?
Try clearing the session cookie for the host (0.0.0.0 in most cases).
Make sure the sessions table exists (rake create_sessions_table) if you are using ActiveRecord for the sessions store.
If your app is not using AR for sessions, try removing the sess_ files from your temp directory.
In other words, if you don’t either close your browser, or delete the localhost cookie, Rails won’t be able to understand the session information you are handing to it, and will just silently die with a 500 error in the logs.