Monday, August 10, 2009

Create Session table in (RoR) Ruby on Rails .!

CREATE TABLE `sessions` (
`id` int(11) NOT NULL auto_increment,
`session_id` varchar(255) default NULL,
`data` varchar(255) default NULL,
`updated_at` datetime default NULL,
`created_at` datetime default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


To change Session cookie to Active records do following setting:
cat config/initializers/session_store.rb

* un-comment line
ActionController::Base.session_store = :active_record_store

3 comments:

Anshul said...

works like a charm, only fact that after it i have an error
"marshal data too short"
inspite the data entered in the table.
thanks

Shrikant Lokhande said...

Hmm interesting, i didn't face this type of issue. as i deploy no of application daily.

Let me know if you have any Question for Rails deployment.

Thanks for the comment.
Shrii

generic cialis said...

Hi, well be sensible, well-all described