Topic: Session key error after upgrading Gems

After doing a sudo gem update my app is having some problems.  Getting this error:

DISPATCHER FAILSAFE RESPONSE (has cgi) Thu May 24 07:52:20 -0400 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
    /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3.6653/lib/action_controller/session/cookie_store.rb:49:in `initialize'
    /usr/lib/ruby/1.8/cgi/session.rb:273:in `new'
    /usr/lib/ruby/1.8/cgi/session.rb:273:in `initialize_without_cgi_reader'
    /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3.6653/lib/action_controller/cgi_ext/session_performance_fix.rb:33:in `initialize'
    /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3.6653/lib/action_controller/cgi_process.rb:125:in `new'
    /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3.6653/lib/action_controller/cgi_process.rb:125:in `session'
    /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3.6653/lib/action_controller/cgi_process.rb:157:in `stale_session_check!'
    /usr/lib/ruby/gems/1.8/gems/actionpack-1.13.3.6653/lib/action_controller/cgi_process.rb:112:in `session'
...

As far as I know, sessions are not enabled so I don't know why this error is coming up.  App worked perfectly fine before the gem update. I tried the suggestion in the error message, but it requires an additional gem (which I couldn't find) and I really don't want to install it if it's not needed.

I'd really appreciate any suggestions.

Re: Session key error after upgrading Gems

It appears that it's a problem with the Active Scaffold plugin I'm using- my other apps that don't use this plugin are fine.  Very frustrating, but I guess it's better I'm dealing with this now than on the production server.  I'm still looking for a way around this issue if anyone has ideas. 

I forgot to mention above that this is preventing my routes from working so I just get "Page Not Found" errors.

Last edited by BIGtrouble77 (2007-05-24 08:39:59)

Re: Session key error after upgrading Gems

OK, now I know what the issue is (I think).  The Gem update (somehow), has made two plugins I'm testing unusable.  The two plugins are Active Scaffolding and Streamlined.  The plugins are installed to my vendor directory, but are not showing up when I do a plugin list.  Furthermore, if I try to remove them I get a message saying that there is no working copy in the vendors directory.

So I need to either figure out a way to revert to the old gems or find out what the incompatibility is with the updated gems.  I know I can extract gems into the vendor directory to override the default one, but so many were updated I wouldn't know where to start.

Last edited by BIGtrouble77 (2007-05-24 09:04:57)

Re: Session key error after upgrading Gems

Is active record broken?

bob$ sudo gem cleanup
Password:
Cleaning up installed gems...
Attempting uninstall on activerecord-1.15.3.6548

You have requested to uninstall the gem:
        activerecord-1.15.3.6548
actionwebservice-1.2.3.6548 depends on [activerecord (= 1.15.3.6548)]
If you remove this gems, one or more dependencies will not be met.
Continue with Uninstall? [Yn]

Last edited by BIGtrouble77 (2007-05-24 09:57:07)

Re: Session key error after upgrading Gems

I got my app running again after freezing rails.  So obviously it's something weird with rails in the system install.  I've already purged ruby and rails from my system and did a reinstall, but there's still some core dependency issues.   

At least I can get back to work.