The Hitchhiker’s Guide to Ruby On Rails Galaxy

Records of my voyage through RoR Galaxy

db:session:create does not seem to work for creating Sessions table

Posted by arjunghosh on January 4, 2008

Well we all know when have multiple machines accessing the same session information, we need need to store the session information somewhere so that all the servers can access it. The solution is store the session information in a database and access the session information from the database.

So with that purpose in mind, I searched some rails books and found that rails has a way to putting sessions in the database.

rake db:session:create

So went ahead an entered this command at my console for my application. And lo behold, what has happened!!!

I get the following error:

(in F:/testdev/trunk)
rake aborted!
Don’t know how to build task ‘db:session:create’
(See full trace by running task with –trace)

So I checked the rake –help and also googled it. It seem lot of them have the same error. In fact it seem that AWS 2nd book also has this error as per an excellent writeup in a blog.

And here I found the solution:

rake db:sessions:create

The issue was with a single ‘s’. Now I use a rake version 0.7.3. Is that the problem? Am I using a lower version of rake?

One Response to “db:session:create does not seem to work for creating Sessions table”

  1. Samuel L. said

    This topic is quite hot on the Internet right now. What do you pay attention to while choosing what to write ?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: