Running Ruby 1.8.6 and Rails 2.2.2 against an Oracle XE database
I just upgraded Rails from 1.2.3 to 2.2.2, which made my cookie based
system for storing session information to error out due to the 4Kb
limit. So, I tried to turn on the active_record_store system by un-
commenting out the “config.action_controller.session_store
= :active_record_store” line in environment.rb and then create a db
session (db:sessions:create) and run a rake migration (rake
Got all that done, which created a table named SESSIONS in the DB.
However I had to tweak the migration code because the table name
generated was singular (SESSION) and Oracle didn’t like that name. I
searched the internet and found a sample where the table name was
plural (SESSIONS), so I made the change hoping for the best. Here is
the SQL generated:
CREATE TABLE “SESSIONS”
( “ID” NUMBER(38,0) NOT NULL ENABLE,
“SESSION_ID” VARCHAR2(255) NOT NULL ENABLE,
PRIMARY KEY (“ID”) ENABLE
CREATE INDEX “INDEX_SESSIONS_ON_SESSION_ID” ON
CREATE INDEX “INDEX_SESSIONS_ON_UPDATED_AT” ON
But now, when I try to start my application, I get an error I’ve been
unable to solve. This is the error:
/!\ FAILSAFE /!\ Wed Dec 24 22:36:41 -0500 2008
Status: 500 Internal Server Error
“DESC session” failed; does it exist?
And here are the first 2 lines of the method:
def columns(table_name, name = nil) #:nodoc: (owner, table_name) = @connection.describe(table_name)
I believe the problem is in the table name change I made (from
singular to plural). I have looked to see if there was a way in Rails
to override the name of the table that stores session information but
couldn’t find any.
I really would appreciate some help on this.
Thanks in advance.