5 Mar 07:41
Re: [RoR] Edge rails having problems with cookies and sessions?
From: s.ross <cwdinfo@...>
Subject: Re: [RoR] Edge rails having problems with cookies and sessions?
Newsgroups: gmane.comp.lang.ruby.rails
Date: 2007-03-05 06:41:47 GMT
Subject: Re: [RoR] Edge rails having problems with cookies and sessions?
Newsgroups: gmane.comp.lang.ruby.rails
Date: 2007-03-05 06:41:47 GMT
Here's the change that is causing your problem: http://dev.rubyonrails.org/browser/trunk/actionpack/lib/ action_controller/session/cookie_store.rb In short, you need to stuff something like the rdoc says in your environment.rb: config.action_controller.session = { :secret => "some secret phrase" } On Mar 4, 2007, at 10:02 PM, Peter Smith wrote: > 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 something? > > -Peter > > On 3/4/07, Peter Smith <goodjobfastcar@...> wrote: 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 > > > > > -- > Peter Smith > GoodJobFastCar@... > http://GoodJobFastCar.com > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@... To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@... For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
RSS Feed