From: Xeno Campanoli Date: 2008-07-10T05:39:10+09:00 Subject: Re: Trying to find good examples of Ruby Sessions. Xeno Campanoli wrote: And I just tried supplying a session key, and that leaves me with the same diagnostic, but oddly it names my session key that it claims I need to name: /usr/lib/ruby/1.8/cgi/session.rb:265:in `initialize_without_cgi_reader': session_key `ccr' should be supplied (ArgumentError) from /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/cgi_ext/session.rb:39:in `initialize' One thing I also notice it I'm using stuff from what might be considered a rails area (action_controller). Presumably this is not a problem...? But I specify my 'ccr' key in the initialization, and then I specify it again to initialize when I don't see an instantiated session variable. Result is still I don't get my 'user_name' value up from the persistence file. > Dave Thomas wrote: >> >> On Jul 9, 2008, at 2:58 PM, Xeno Campanoli wrote: >> >>> You're right. I miscoded my copy. Okay, my apologies. Still, it >>> would be nice to have more examples. Can anyone point me to some? >> >> Rails? >> >> > Not really, though I am accessing active record in here, but I'm > presuming that should not affect it. This was written in plain ruby, > and then I decided to add a rails configuration tool. Anyway, I think I > made headway when I realized 'new_session' => true might be the default. > Now running it with false I get: > > trace user_name: campanolix > trace @Session: CGI::Session > /usr/lib/ruby/1.8/cgi/session.rb:265:in `initialize_without_cgi_reader': > session_key `_session_id' should be supplied (ArgumentError) > from > /var/lib/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/cgi_ext/session.rb:39:in > `initialize' > ... > so I presume that means I cannot run with just all defaults. I'm using > the online example with 'user_name', but presumably session_key is > independent of my user name. I was presuming it would all be handled > with the cookie...? Perhaps I'm only demonstrating how confused I am. > > xc > > > >