public
Last active

Post-fork "require 'oci8'" yields ORA-12154

  • Download Gist
ora_NOK.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11
require 'daemons'
 
Daemonize.daemonize(File.expand_path('./log.txt'), 'test')
 
require 'oci8'
 
db = OCI8.new('theuser', 'thepassword', 'SID');
 
db.exec('select * from utilisateurs where id = 74944') do |r|
puts r.join(',')
end
ora_OK.rb
Ruby
1 2 3 4 5 6 7 8 9 10
require 'daemons'
require 'oci8'
 
Daemonize.daemonize(File.expand_path('./log.txt'), 'test')
 
db = OCI8.new('theuser', 'thepassword', 'SID');
 
db.exec('select * from utilisateurs where id = 74944') do |r|
puts r.join(',')
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.