Anyone know what''s up with the activerecord session store when using the oracle adapter in Rails 2.0.2 ? I can set a session variable and can then see it''s actually set using the debugger, but after the request completes the session is empty (the @data member is nil). The session_id is staying the same and the updated_at field is being updated but nothing I put in a session makes it to the end of a request. It''s also worth mentioning the oracle adapter wouldn''t work for me at all until I found this patch code which provides the select_rows method, seems they forgot to implement it or something: require ''active_record/connection_adapters/oracle_adapter'' module ActiveRecord module ConnectionAdapters class OracleAdapter def select_rows(sql, name = nil) @connection.query_with_result = true result = execute(sql, name) rows = [] result.each { |row| rows << row } result.free rows end end end end I placed that in environment.rb and it works best I can tell but now I find my active record sessions are broken. I''m not sure if the two problems are related. The default cookie sessions work without an issues. -- Greg Donald http://destiney.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Greg, I ran into the same problem. I found the solution here: http://blog.rayapps.com/2008/01/08/fix-for-rails-20-on-oracle-with-database-session-store/ Basically because the session data is stored in a CLOB you need to include this in your environment.rb class CGI::Session::ActiveRecordStore::Session after_save :write_lobs end -Paul On Jan 4, 3:40 pm, "Greg Donald" <gdon...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Anyone know what''s up with the activerecord session store when using > theoracleadapter in Rails 2.0.2 ? > > I can set a session variable and can then see it''s actually set using > the debugger, but after the request completes the session is empty > (the @data member is nil). The session_id is staying the same and the > updated_at field is being updated but nothing I put in a session makes > it to the end of a request. > > It''s also worth mentioning theoracleadapter wouldn''t work for me at > all until I found this patch code which provides the select_rows > method, seems they forgot to implement it or something: > > require ''active_record/connection_adapters/oracle_adapter'' > module ActiveRecord > module ConnectionAdapters > class OracleAdapter > def select_rows(sql, name = nil) > @connection.query_with_result = true > result = execute(sql, name) > rows = [] > result.each { |row| rows << row } > result.free > rows > end > end > end > end > > I placed that in environment.rb and it works best I can tell but now I > find my active recordsessionsare broken. I''m not sure if the two > problems are related. > > The default cookiesessionswork without an issues. > > -- > Greg Donaldhttp://destiney.com/--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 1/15/08, paul damer <pdamer-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Greg, > I ran into the same problem. I found the solution here: > http://blog.rayapps.com/2008/01/08/fix-for-rails-20-on-oracle-with-database-session-store/ > > Basically because the session data is stored in a CLOB you need to > include this in your environment.rb > > class CGI::Session::ActiveRecordStore::Session > after_save :write_lobs > endThanks. I''ll give it a try. -- Greg Donald http://destiney.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---