Session active_record_store

I attempted to make a toy rails 2.3.5 application in Debian 'squeeze'
that uses the database to store sessions.

My environment.rb is

   require File.join(File.dirname(__FILE__), 'boot')

   Rails::Initializer.run do |config|
      config.action_controller.session_store = :active_record_store
      config.time_zone = 'UTC'
   end

My routes.rb is

   ActionController::Routing::Routes.draw do |map|
      map.root(:controller => 'application')
   end

My views consist of app/views/application/index.html.erb which
contains

   Hello World <%= Time.zone.now %>

I removed public/index.html. I ran 'rake db:sessions:create' followed
by 'rake db:migrate' which created a table 'sessions' in the postgres
database 'railsapp_development'.

The app starts without error and brings up the 'Hello World' page. It
doesn't attempt to set a cookie and no row appears in the sessions
table.

What's wrong?

Thanks

The app starts without error and brings up the 'Hello World' page. It
doesn't attempt to set a cookie and no row appears in the sessions
table.

What's wrong?

Rails won't create a session until you try and use one, which you
don't appear to be doing

Fred

Rails won't create a session until you try and use one, which you
don't appear to be doing

How does one "use a session"?

u write in your controller
session[:blala]
if u not write it, u are not using session

Ivan Nastyukhin
dieinzige@me.com

That worked, thanks.