Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread
Message: 97243
BY: Michel Blanc (leucos)
DATE: 2011-12-11 17:25
SUBJECT: Post-fork "require 'oci8'" yields ORA-12154

 

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.



Thread View

Thread Author Date
Post-fork "require 'oci8'" yields ORA-12154Michel Blanc2011-12-11 17:25
      RE: Post-fork "require 'oci8'" yields ORA-12154Michel Blanc2011-12-11 19:56

Post a followup to this message