From: KUBO Takehiro Date: 2009-04-15T21:59:31+09:00 Subject: Re: connecting to Oracle using OCI8 and DBI Hi, On Wed, Apr 15, 2009 at 12:09 AM, Peter Bailey wrote: >>> Exception: Could not load driver (unitialized constant OCI8::Driver) Did you manually edit dbi.rb? The OCI8 Driver defines DBI::DBD::OCI8::Driver, but not OCI8::Driver. >> What version of ruby, ruby-dbi and ruby-oci8 do you use? >> How did you install ruby-dbi and ruby-oci8? > > Thanks, > I'm using Ruby 1.8.6. I did a gem install of dbi, so, presumably, it's > the latest. And, I downloaded and installed the latest version of oci8, > for Windows. ruby-dbi 0.4.1? ruby-oci8 2.0.1 or 1.0.5? Could you tell me the result of the following command on the irb console? require 'dbi' DBI::VERSION require 'oci8' OCI8::VERSION dbd_dr = DBI::DBD.const_get(:OCI8) dbd_dr::Driver.new DBI.connect('dbi:OCI8:', 'username', 'password') Copy and paste the output as follows: c:\> irb irb(main):001:0> require 'dbi' => true irb(main):002:0> DBI::VERSION => "0.4.1" irb(main):003:0> require 'oci8' => true irb(main):004:0> OCI8::VERSION => "2.0.1" irb(main):005:0> dbd_dr = DBI::DBD.const_get(:OCI8) => DBI::DBD::OCI8 irb(main):006:0> dbd_dr::Driver.new => # irb(main):007:0> DBI.connect('dbi:OCI8:', 'username', 'password') => #>, @trace_output=nil> irb(main):008:0>