Status: 500 Internal Server Error - A session_key is require


#1

Hi,

Anyone seen this error / have any suggestions here?

I basically did a “cap deploy” to dreamhost but I’m now getting this in
the
“production.log” when trying to run up the application. The key things
I
changed in the deployment is that I:

a) When to rails v1.2.3 (well to revision 6419 really for completeness -
which I looked up to be v1.2.3)
b) I implemented the deployment technique from Mike C. at the bottom
section (“The Cadillac Approach”) of
http://clarkware.com/cgi/blosxom/2007/01/18#ManagingVersionsWithCap,
i.e.

  • checks out rails (rev 6419) to a shared area
  • then symlinks the app /vendor/rails directory to this area
  • basically allows capistrano to be run to update your application but
    without having to put rails into the project to minimise checkout time

Any ideas?

(actually I’m not exactly sure with this approach what setting I should
use
in environment.rb for RAILS_GEM_VERSION - I’ve tried both commenting it
out
and setting it to ‘1.2.2’ but I get the below error in both cases)

DISPATCHER FAILSAFE RESPONSE (has cgi) Tue Apr 03 12:33:37 -0700 2007
Status: 500 Internal Server Error
A session_key is required to write a cookie containing the session
data.
Use config.action_controller.session = { :session_key =>
“_myapp_session”,
:secret => “some secret phrase” } in config/environment.rb

…/config/…/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb:49:in
initialize' /usr/lib/ruby/1.8/cgi/session.rb:273:innew’
/usr/lib/ruby/1.8/cgi/session.rb:273:in
`initialize_without_cgi_reader’

…/config/…/vendor/rails/actionpack/lib/action_controller/cgi_ext/session_performance_fix.rb:33:in
`initialize’

…/config/…/vendor/rails/actionpack/lib/action_controller/cgi_process.rb:124:in
`new’

…/config/…/vendor/rails/actionpack/lib/action_controller/cgi_process.rb:124:in
`session’

…/config/…/vendor/rails/actionpack/lib/action_controller/cgi_process.rb:156:in
`stale_session_check!’

…/config/…/vendor/rails/actionpack/lib/action_controller/cgi_process.rb:111:in
`session’

…/config/…/vendor/rails/actionpack/lib/action_controller/base.rb:1097:in
`assign_shortcuts_without_flash’

…/config/…/vendor/rails/actionpack/lib/action_controller/flash.rb:174:in
`assign_shortcuts’

…/config/…/vendor/rails/actionpack/lib/action_controller/base.rb:467:in
`process_without_filters’

…/config/…/vendor/rails/actionpack/lib/action_controller/filters.rb:652:in
`process_without_session_management_support’

…/config/…/vendor/rails/actionpack/lib/action_controller/session_management.rb:122:in
`process’

…/config/…/vendor/rails/actionpack/lib/action_controller/base.rb:326:in
process' ../config/../vendor/rails/railties/lib/dispatcher.rb:39:indispatch’
…/config/…/vendor/rails/railties/lib/fcgi_handler.rb:168:in
process_request' ../config/../vendor/rails/railties/lib/fcgi_handler.rb:143:inprocess_each_request!’
…/config/…/vendor/rails/railties/lib/fcgi_handler.rb:109:in
with_signal_handler' ../config/../vendor/rails/railties/lib/fcgi_handler.rb:142:inprocess_each_request!’
/usr/lib/ruby/1.8/fcgi.rb:600:in each_cgi' /usr/lib/ruby/1.8/fcgi.rb:597:ineach’
/usr/lib/ruby/1.8/fcgi.rb:597:in each_cgi' ../config/../vendor/rails/railties/lib/fcgi_handler.rb:141:inprocess_each_request!’
…/config/…/vendor/rails/railties/lib/fcgi_handler.rb:55:in
process!' ../config/../vendor/rails/railties/lib/fcgi_handler.rb:25:inprocess!’
dispatch.fcgi:24

Tks
Greg


#2

Greg H. wrote:
[SNIP rails problem]

http://www.rubyonrails.org/community

The Rails folk are probably more experienced with all things Rails. :wink:


Phillip “CynicalRyan” Gawlowski
http://cynicalryan.110mb.com/

Rule of Open-Source Programming #5:

A project is never finished.


#3

oops - choose the wrong group by mistake