This project is archived and is in readonly mode.

#2534 ✓duplicate
rubynewbie

Session not working after switching to Active_record_store

Reported by rubynewbie | April 21st, 2009 @ 07:00 AM | in 2.x

I just upgraded to rails 2.3.2 from rails 1.2.x and one of the issue was that I was getting an error of CookieOverflow.

Setup is Apache+Phusion+Rails 2.3.2+Mysql

So, I switched to active_record_store by uncommenting this line in enviroment.rb and creating sessions table -

config.action_controller.session_store = :active_record_store

sessions table - +------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------+--------------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | session_id | varchar(255) | NO | MUL | NULL | | | data | text | YES | | NULL | | | created_at | datetime | YES | | NULL | | | updated_at | datetime | YES | MUL | NULL | | +------------+--------------+------+-----+---------+----------------+ 5 rows in set (0.00 sec)

Now, I am trying to set various values in session like -

session[:affiliate_id] = _affilID

But this is not working.

No error message is generated either. When I try to do session.inspect, couple of variables are getting set -

{:guest_clicks_count=>1}

Any ideas where the issue is?

Any help will be greatly appreciated.

Regards, Rajat

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages