# Database Sessions with Oracle 10g Problem

**URL:** <https://www.ruby-forum.com/t/database-sessions-with-oracle-10g-problem/103316>\
**Category:** Rails\
**Created:** [May 4, 2007, 4:26am UTC](https://www.ruby-forum.com/t/database-sessions-with-oracle-10g-problem/103316 "2007-05-04T04:26:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SteveG](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ecae2f/32.png) [@SteveG](https://www.ruby-forum.com/u/SteveG)\
**Post date:** [May 4, 2007, 4:26am UTC](https://www.ruby-forum.com/t/database-sessions-with-oracle-10g-problem/103316/1 "2007-05-04T04:26:32Z")

</div>

Hello all,

I changed the app to use the active\_record\_store for sessions. This  
worked fine in my Windows development environment. Then I moved the  
app over to the Linux Dev environment and now I am seeing oracle  
ORA-24812 errors as soon as I access the app. The WIndows and Linux  
environments point to the same database. The linux box is using a  
oracle full client although, since I did not install it, I do not know  
the exact one.

Any ideas? Any help is appreciated

Thanks,  
Steve

Error from log:  
May 03 21:17:03 appd01 rails[14929]: OCIError (Error while trying to  
retrieve text for error ORA-24812): /usr/local/lib/ruby/site\_ruby/  
1.8/oci8.rb:837:in `write' /usr/local/lib/ruby/site_ruby/1.8/ oci8.rb:837:in`write’ /vendor/rails/activerecord/lib/active\_record/  
connection\_adapters/oracle\_adapter.rb:56:in `write_lobs' /vendor/ rails/activerecord/lib/active_record/connection_adapters/ oracle_adapter.rb:49:in`each’ /vendor/rails/activerecord/lib/  
active\_record/connection\_adapters/oracle\_adapter.rb:49:in  
`write_lobs' /vendor/rails/activerecord/lib/active_record/ callbacks.rb:333:in`send’ /vendor/rails/activerecord/lib/  
active\_record/callbacks.rb:333:in `callback' /vendor/rails/ activerecord/lib/active_record/callbacks.rb:330:in`each’ /vendor/  
rails/activerecord/lib/active\_record/callbacks.rb:330:in  
`callback' /vendor/rails/activerecord/lib/active_record/ callbacks.rb:243:in`create\_or\_update’ /vendor/rails/activerecord/  
lib/active\_record/base.rb:1546:in `save_without_validation' /vendor/ rails/activerecord/lib/active_record/validations.rb:752:in`save\_without\_transactions’ /vendor/rails/activerecord/lib/  
active\_record/transactions.rb:129:in `save' /vendor/rails/ activerecord/lib/active_record/connection_adapters/abstract/ database_statements.rb:59:in`transaction’ /vendor/rails/  
activerecord/lib/active\_record/transactions.rb:95:in `transaction' / vendor/rails/activerecord/lib/active_record/transactions.rb:121:in`transaction’ /vendor/rails/activerecord/lib/active\_record/  
transactions.rb:129:in `save' /vendor/rails/actionpack/lib/ action_controller/session/active_record_store.rb:309:in`update’ /  
vendor/rails/activerecord/lib/active\_record/base.rb:867:in  
`silence' /vendor/rails/actionpack/lib/action_controller/session/ active_record_store.rb:309:in`update’ /vendor/rails/actionpack/lib/  
action\_controller/sessi

---

<div class="post-metadata">

**Author:** ![SteveG](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ecae2f/32.png) [@SteveG](https://www.ruby-forum.com/u/SteveG)\
**Post date:** [May 4, 2007, 6:20pm UTC](https://www.ruby-forum.com/t/database-sessions-with-oracle-10g-problem/103316/2 "2007-05-04T18:20:00Z")

</div>

Hello. I figured out what the issue was. The ORACLE\_HOME and  
LD\_LIBRARY\_PATH env variables were not being set. The application  
worked fine if I started mongrel manually locally on the box since the  
variables are in the bash\_profile. The application fails if I used cap  
to start/restart mongrel. The weird thing is the whole app worked fine  
until I told it to start using the active record store for sessions. I  
guess it was a problem with using CLOB datatypes.

I used the following solution:

> **[Setting environment variables for mongrel](http://codemode.blogspot.com/2006/12/setting-environment-variables-for.html)**
>
> We were going to use Verisign's PayFlowPro merchant facilities and implemented a solution based around a ruby library called pfpro4r . A pro...

I also found a couple more if that one does not work for you:  
[http://forum.textdrive.com/viewtopic.php?pid=119876](http://forum.textdrive.com/viewtopic.php?pid=119876)  
[http://cwilliams.textdriven.com/articles/2006/10/27/getting-capistrano-to-play-with-oracle-on-red-hat-enterprise-linux](http://cwilliams.textdriven.com/articles/2006/10/27/getting-capistrano-to-play-with-oracle-on-red-hat-enterprise-linux)
