500 Internal Error: Rails 2.0

I’m playing around with Rails 2.0 for the first time here at work.  I had already done my modeling and such, and moved on to create my first view when I run into this:

 

 

I’m a bit confused by this because it doesn’t look *anything* like the default 500 error page that is included with rails.  So I check that my route is set properly – it is.  Then I check my logs and see:

 

  Status: 500 Internal Server Error

  A secret is required to generate an integrity hash for cookie session data. Use config.action_controller.session = { :session_key => "_myapp_session", :secret => "some secret phrase of at least 30 characters" } in config/environment.rb

 

Ok, simple enough; I copy that into my environment.rb file.  Voila, it works.  But if you need it by default, why not include it by default and have people uncomment it if they make changes that require such?? Jesus.

 

BTW: This is what the 500 message is supposed to look like

3 responses

Only in production mode though ;-)

here's what ours looks like: http://posterous.com/500.html -- we try to minimize the amount it gets shown, but it does happen often.

Also, for production sites you HAVE to install ExceptionNotifier. It is the most badass plugin ever and will save your ass time and again.

In development the error will be inline with backtrace, thankfully...

Stop using windows, it's not the problem this time, but is likely the cause of your life problems in general.

And the Agile Rails Development book (for 2.1) comes out in Oct 2008 (I think), but the pdf version is available now.

Rails development in Windows is like wearing a parka in Death Valley. It fucking sucks.