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 http://0.0.0.0:1111
=> 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
/pt/customers3/openwater/owcs/cs12/public/…/config/…/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb:49:in
`initialize’
/Applications/Locomotive2/Bundles/standardRailsSept2006.locobundle/powerpc/lib/ruby/1.8/cgi/session.rb:273:in
`initialize_without_cgi_reader’
/pt/customers3/openwater/owcs/cs12/public/…/config/…/vendor/rails/actionpack/lib/action_controller/cgi_ext/session_performance_fix.rb:32:in
`initialize’
I edited config/environment.rb like this:
Rails::Initializer.run do |config|
config.action_controller.session = { :secret => “some secret phrase X”
}
end
I bounced the server.
I tried the site and got another 500.
Now I see this:
Processing LoginController#index (for 127.0.0.1 at 2007-03-04 21:29:27)
[GET]
Session ID: f85a3a9b2667f3e0eb1c38f55dc2ede0
Parameters: {“action”=>“index”, “controller”=>“login”}
ArgumentError (`name’ required):
/vendor/rails/actionpack/lib/action_controller/cgi_ext/cookie_performance_fix.rb:44:in
`initialize’
/vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb:129:in
`write_cookie’
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
-Peter