Hi,
I need to access an Oracla database with Ruby. I’ve loaded OCI8 and DBI.
When I run a simple script to just check on the existence of an image in
the database, I get a DBI interface error, and, this:
Exception: Could not load driver (unitialized constant OCI8::Driver)
Hi,
I need to access an Oracla database with Ruby. I’ve loaded OCI8 and DBI.
When I run a simple script to just check on the existence of an image in
the database, I get a DBI interface error, and, this:
Exception: Could not load driver (unitialized constant OCI8::Driver)
What version of ruby, ruby-dbi and ruby-oci8 do you use?
How did you install ruby-dbi and ruby-oci8?
Hi,
I need to access an Oracla database with Ruby. I’ve loaded OCI8 and DBI.
When I run a simple script to just check on the existence of an image in
the database, I get a DBI interface error, and, this:
Exception: Could not load driver (unitialized constant 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.
A colleague of mine suggested that, for my purposes, I can just use http
to query my database. So, I’ve done that and it works. But, I would like
to understand better how to actually get into the database, because, in
the future, I could foresee needing to actually pull files from it.
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?
I have thought that DBI::DBD.const_get(:OCI8) would return
DBI::DBD::OCI8 and
it would raise an exception if DBI::DBD::OCI8 is not defined. But it
returns OCI8
if DBI::DBD::OCI8 is not found. I have misunderstood.
irb(main):004:0> dbd_dr::Driver.new
NameError: uninitialized constant OCI8::Driver
from (irb):4
irb(main):005:0> DBI.conect(‘dbi::OCI8:’, ‘orcauser’, ‘orca2user’)
NoMethodError: undefined method `conect’ for DBI:Module
from (irb):5
irb(main):006:0>
You did a typo. Use ‘connect’ instead of ‘conect’.
DBI.connect will be raise the following exception when using dbi 0.1.1
and oci8 1.0.5.
DBI::InterfaceError: Could not load driver (no such file to load
– DBD/OCI8/OCI8)
Did you copy oci8.rb to DBD/OCI8/OCI8.rb?
You have two ways to use dbi and Oracle.
Use the latest dbi instead of 0.1.1.
Add “require ‘rubygems’” prior to “require ‘dbi’”.
Otherwise,
Use the latest dbi instead of 0.1.1.
� �Add “require ‘rubygems’” prior to “require ‘dbi’”.
Otherwise,
Copy dbd/OCI8.rb to DBD/OCI8/OCI8.rb.
Yet another way:
3. Use One-Click Installer 1.8.6-27 Release Candidate 2
The bundled dbi version is 0.2.2.
You have no need to copy dbd/OCI8.rb to DBD/OCI8/OCI8.rb.
Yeh, well, I don’t see any one-click installer for 1.8.6-27, only 1.8.6.
And, that’s what I’ve been using. And, if I go to these web sites and
choose the latest oci8 and dbi, I don’t see why it just doesn’t work.
So, for now, I’m just giving up. Thanks.
Use the latest dbi instead of 0.1.1.
Add “require ‘rubygems’” prior to “require ‘dbi’”.
Otherwise,
Copy dbd/OCI8.rb to DBD/OCI8/OCI8.rb.
Yet another way:
3. Use One-Click Installer 1.8.6-27 Release Candidate 2
The bundled dbi version is 0.2.2.
You have no need to copy dbd/OCI8.rb to DBD/OCI8/OCI8.rb.
Use the latest dbi instead of 0.1.1.
Add “require ‘rubygems’” prior to “require ‘dbi’”.
Gem packages are unavailable unless “require ‘rubygems’”.
Otherwise,
2. Copy dbd/OCI8.rb to DBD/OCI8/OCI8.rb.
Yet another way:
3. Use One-Click Installer 1.8.6-27 Release Candidate 2
The bundled dbi version is 0.2.2.
You have no need to copy dbd/OCI8.rb to DBD/OCI8/OCI8.rb.
Yeh, well, I don’t see any one-click installer for 1.8.6-27, only 1.8.6.
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?