[RoR] Edge rails having problems with cookies and sessions?

Rails people,

I just installed edge rails 6334

Script/server comes up okay but when I try to connect to my site
the browser spits out a 500.

I see this in the console:

=> Booting lighttpd (use ‘script/server webrick’ to force WEBrick)
=> Rails application starting on
=> Call with -d to detach
=> Ctrl-C to shutdown server (see config/lighttpd.conf for options)
DISPATCHER FAILSAFE RESPONSE (has cgi) Sun Mar 04 21:24:13 PST 2007
Status: 500 Internal Server Error
A secret is required to generate an integrity hash for cookie session
data. Use config.action_controller.session = { :secret => “some secret
phrase” } in config/environment.rb




I edited config/environment.rb like this:

Rails::Initializer.run do |config|
config.action_controller.session = { :secret => “some secret phrase X”

I bounced the server.

I tried the site and got another 500.

Now I see this:

Processing LoginController#index (for at 2007-03-04 21:29:27)
Session ID: f85a3a9b2667f3e0eb1c38f55dc2ede0
Parameters: {“action”=>“index”, “controller”=>“login”}

ArgumentError (`name’ required):



Other people must be bumping into this issue; right?

I’ve done some searching with google; I see no evidence that others have
bumped into this bug.

Any clues on how to deal with this cookie_performance_fix.rb
ArgumentError ?

Info about my setup:

$ script/about
About your application’s environment
Ruby version 1.8.4 (powerpc-darwin7.9.0)
RubyGems version 0.9.0
Rails version 1.2.0
Active Record version 1.14.4
Action Pack version 1.12.5
Action Web Service version 1.1.6
Action Mailer version 1.2.5
Active Support version 1.3.1
Edge Rails revision 6334
Application root /owcs/cs12
Environment development
Database adapter mysql
Database schema version 112


I just tried edge rails 6149
it seems to work okay
(after I removed
config.action_controller.session = { :secret => “some secret phrase X” }
from environment.rb)

It looks like some work has been done to sessions and cookies recently
but I’m not finding any clues on how to work around the 500 I see when
I try to create a session object in edge rails 6334.

Do I need to make some changes to my environment or install a gem or


On 3/4/07, Peter S. [email protected] wrote:

=> Booting lighttpd (use ‘script/server webrick’ to force WEBrick)
initialize' Rails::Initializer.run do |config| [GET] write_cookie’

Edge Rails revision 6334
Application root /owcs/cs12
Environment development
Database adapter mysql
Database schema version 112


Peter S.
[email protected]


I figured this out.

It boiled down to a mismatch between my RAILS_ROOT and my edge rails.

I did this to fix it…

-Install the latest version of Locomotive on my Mac
-update gems with “gem update --system”
-update rake with “gem update rake”
-rails a_new_app
-rake rails:freeze:edge
-copy in my database.yml, routes.rb, migrations, models, controllers,
images, stylesheets, and layouts
(tip-toe around an extra line in application.rb)
-Add a line to environment.rb:
config.action_controller.session = { :secret => “some secret
phraseX” }

And script/server behaved like I like.

I’m happy now…


Here’s the change that is causing your problem:


In short, you need to stuff something like the rdoc says in your

config.action_controller.session = { :secret => “some secret phrase” }