From: Robert Gleeson Date: 2008-09-11T18:55:41+09:00 Subject: CGI::Session / mod_ruby problem. Hi everybody, I am making an AJAX call to login.rhtml, in login.rhtml a new session is created, and then I use javascript to reload the page to /interface/index.rhtml where i attempt to continue the session created in login.rhtml but everytime I do this I get an ArgumentError(from what ive read means no session exists.) I am using mod_ruby/eruby to do this.. The code I am using is posted below : -- login.rhtml -- session = CGI::Session.new(cgiObject,'database_manager' => CGI::Session::PStore, 'session_key' => '_rb_sess_id', 'session_expires' => Time.now + 30 * 60, 'prefix' => 'sessions_pstore', 'new_session' => true) session['username'] = cgiObject['username'] session.update session.close -- interface/index.rhtml -- session = CGI::Session.new(cgiObject,'database_manager' => CGI::Session::PStore, 'session_key' => '_rb_sess_id', 'prefix' => 'sessions_pstore' 'new_session' => false ) puts session['username'] ----------------------------------- I get a server error each time, the error is : [Thu Sep 11 10:38:19 2008] [error] mod_ruby: /usr/lib/ruby/1.8/cgi/session.rb:271:in `initialize': session_key `_rb_sess_id' should be supplied (ArgumentError) -- Posted via http://www.ruby-forum.com/.