Forum: Ruby on Rails session store active_record_store doesn't work.

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Goro K. (Guest)
on 2008-12-31 10:28
(Received via mailing list)
I want to use acitive record store session.
So I edited files like below.

config.action_controller.session_store = :active_record_store

protect_from_forgery :secret => '54420ada.........'

*rake task
rake db:sessions:create #successfully created

And controller and views like below

class TestIndexController < ApplicationController
  def index
    session[:test]='Test Value'

<%=session[:test]%> #=>'Test Value'

<%=session[:test]%> #=>nil<==This is the problem!!

Session table creates session data certainly, but I can't get
value except index action.
Why?? Please give me advice!

PS:My environment is below.
Rails 2.2.2
gem 1.3.1
Mac OS 10.5.5

View this message in context:
Sent from the RubyOnRails Users mailing list archive at
This topic is locked and can not be replied to.