Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: Michel Blanc
RE: Post-fork "require 'oci8'" yields ORA-12154 [ reply ]  
2011-12-11 19:56
Oh well, it seems I'm unable to reproduce the issue tonight...
Please, set this aside, I'll come back when I'll have a clearer picture on this.

By: Michel Blanc
Post-fork "require 'oci8'" yields ORA-12154 [ reply ]  
2011-12-11 17:25
Dear All,

I'm experiencing issues with ruby-oci8 (2.0.6) under MRI 1.9.3.

When I require oci8 and then fork, everything is fine, but when I first fork and then requiring oci8, I get an oci error :

ORA-12154: TNS:could not resolve the connect identifier specified

So it seems that oci8 doesn't like to be required after a fork.

I checked the environment and everything seems fine (ORACLE_HOME).

I've put two samples on a gist here :
https://gist.github.com/1461598 (oracle_NOK.rb is the one yielding the error, oracle_OK.rb works fine).

There are many workarounds in my case (I could "preload" oci8 in my rackup file, set RUBYOPTS, etc...), so that's not critical to me, but I think this issue (if it's confirmed) is worth being looked at.

Thanks for your time and attention.

Michel.