Rails: "500 - Internal server error" caused by error in application.rb

Today, while working on my Ruby on Rails project, I got a "500 - Internal server error" page soon after I tried to run the project after running a migration. There was nothing else on the screen except for that one line.

I tried a few things, like restarting NetBeans, and opening another project to see if the problem was with my Ruby installation. (Other projects were running fine, so the problem wasn't with Ruby.) I even tried running the project from another desktop, getting the same 500 error.

Finally, I did the one thing that I should have done first - checking the development log file. There I found that the problem was a tiny bit of buggy code in the application.rb file that was stopping the project from initializing properly. And because the application failed to initialize, I wasn't getting those detailed error messages that I'm so familiar with.

Have you done something so stupid while developing an application? Forgetting to look at the first place where you could have spotted the problem and instead wasting an hour theorizing about what could be causing the problem?

1 comments:

TechSlam said...

Wonderful post. This is a lesson to all those who just don't care whats all the development log is all about

Post a Comment