From: djberg96@... (Daniel Berger) Date: 2002-01-14T23:29:15+09:00 Subject: Problem running DBI under cron Hi all, Ruby 1.6.4, DBI .11, Solaris 8 I've got a Ruby script that runs a little report each day from an Oracle database. When I run it from the command line, it works ok. However, it chokes under cron with this message sent to the logfile: usr/lib/ruby/site_ruby/1.6/dbi/dbi.rb:403:in `load_driver': Could not load driver (uninitialized constant Oracle at DBI::DBD) (DBI::InterfaceError) from /usr/lib/ruby/site_ruby/1.6/dbi/dbi.rb:318:in `_get_full_driver' from /usr/lib/ruby/site_ruby/1.6/dbi/dbi.rb:298:in `connect' from /home/database/Run/my_program.rb:30 Line 30 is the "connect" call. If memory serves, I got this error in the past when the LD_LIBRARY_PATH environment variable wasn't set. I have the following lines at the top of my program, however... ENV['HOME'] = '/home/dir' ENV['PATH'] = '/bin:/usr/bin:/usr/sbin:/usr/local/bin' ENV['ORACLE_HOME'] = '/path/app/oracle/product/8.1.6' ENV['ORACLE_BASE'] = '/path/app/oracle' ENV['ORACLE_SID'] = 'my_sid' ENV['LD_LIBRARY_PATH'] = '/path/app/oracle/product/8.1.6/lib' This solved the problem in analogous Perl programs, but didn't seem to do the tricky with Ruby. Anyone have any ideas? Thanks in advance. Dan