Forum: Ruby on Rails Uncommenting a line in environment.rb file

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Gouthami R. (Guest)
on 2009-03-24 07:39
Hi, I am a newbee to rubyonrails. I was given task of migration of
database from mysql to oracle for a ror application.

My probelm is when I go into my environment.rb file and uncomment the;

config.action_controller.session_store = :active_record_store

my application doesnt work atall. I do have a sessions table but the
sessions table data is not being updated with the latest time and date.
Before this application was working with MySql database, it was working
properly, but now am using oracle and its not working.

And if I comment it,

#config.action_controller.session_store = :active_record_store

the application is working fine. But I need sessions for my entire
aplication.
Can you please suggest how I should proceed?
Greg D. (Guest)
on 2009-03-24 18:07
(Received via mailing list)
On Tue, Mar 24, 2009 at 12:39 AM, Gouthami Rao
<removed_email_address@domain.invalid> wrote:
> Before this application was working with MySql database, it was working
> properly, but now am using oracle and its not working.
>
> And if I comment it,
>
> #config.action_controller.session_store = :active_record_store
>
> the application is working fine. But I need sessions for my entire
> aplication.
> Can you please suggest how I should proceed?


Chances are you your session data field is an Oracle clob type
(especially if you used `rake db:sessions:create`).

That won't work in Oracle, it needs to be a string type.

In your sessions migration, change

t.text :data

to

t.string :data, :limit => 4000


More info here:
http://destiney.com/blog/moving-a-rails-app-from-1-2-6-2-0-2



--
Greg D.
http://destiney.com/
Gouthami R. (Guest)
on 2009-03-25 07:03
I even tried that but my application is still not working...!
But my data field in sessions table is filled with its values.
This topic is locked and can not be replied to.