Skip to content

Instantly share code, notes, and snippets.

@leucos
Created December 11, 2011 17:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leucos/1461598 to your computer and use it in GitHub Desktop.
Save leucos/1461598 to your computer and use it in GitHub Desktop.
Post-fork "require 'oci8'" yields ORA-12154
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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment