# Oracle driver doesn't want to load

**URL:** <https://rubytalk.org/t/oracle-driver-doesnt-want-to-load/36583>\
**Category:** ruby-talk\
**Created:** [31 March 2007 12:21 UTC](https://rubytalk.org/t/oracle-driver-doesnt-want-to-load/36583 "2007-03-31T12:21:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ma\_Ha](https://avatars.discourse-cdn.com/v4/letter/m/e9bcb4/32.png) [@Ma\_Ha](https://rubytalk.org/u/Ma_Ha)\
**Post date:** [31 March 2007 12:21 UTC](https://rubytalk.org/t/oracle-driver-doesnt-want-to-load/36583/1 "2007-03-31T12:21:51Z")

</div>

Hello,

I hope someone can give a hint what is going wrong here.

I have a Ruby program that connects to an Oracle database using the DBI  
module. This is the code for the connecting:

dbh = DBI.connect("DBI:Oracle:db:host", "user", "pw")

I would use the OCI8 driver, but only DBD::Oracle is installed here, and  
I won't get OCI8 before Monday 😉

My program raises following exception while connecting that I don't  
understand:

/usr/lib/ruby/vendor\_ruby/1.8/dbi.rb:344:in `load\_driver': Could not  
load driver (no such file to load -- oracle) (DBI::InterfaceError)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /usr/lib/ruby/vendor\_ruby/1.8/dbi.rb:227:in  
`\_get\_full\_driver'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /usr/lib/ruby/vendor\_ruby/1.8/dbi.rb:213:in `connect'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from GeoDatabaseController.rb:35:in `connect\_to\_oracle'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from GeoDatabaseController.rb:339:in `main'  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from GeoDatabaseController.rb:350

What is going wrong here? I have looked at dbi.rb for a while trying to  
understand, but I still have no clue.

Thanks,  
Maria

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Brian\_Candler](https://avatars.discourse-cdn.com/v4/letter/b/5f9b8f/32.png) [@Brian\_Candler](https://rubytalk.org/u/Brian_Candler)\
**Post date:** [1 April 2007 07:43 UTC](https://rubytalk.org/t/oracle-driver-doesnt-want-to-load/36583/2 "2007-04-01T07:43:40Z")

</div>

> I hope someone can give a hint what is going wrong here.
> 
> I have a Ruby program that connects to an Oracle database using the DBI  
> module. This is the code for the connecting:
> 
> dbh = DBI.connect("DBI:Oracle:db:host", "user", "pw")
> 
> I would use the OCI8 driver, but only DBD::Oracle is installed here, and  
> I won't get OCI8 before Monday 😉

You can't use Oracle from Ruby without ruby-oci8.

Even the DBD::Oracle module is supplied as part of the ruby-oci8 package. (I  
don't know if it's \*also\* included with some other package or available  
separately, but it definitely won't work without ruby-oci8 being installed)

> /usr/lib/ruby/vendor\_ruby/1.8/dbi.rb:344:in `load\_driver': Could not  
> load driver (no such file to load -- oracle) (DBI::InterfaceError)  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;from /usr/lib/ruby/vendor\_ruby/1.8/dbi.rb:227:in  
> `\_get\_full\_driver'

That implies to me that DBD::Oracle isn't available either.

Anyway, your solution is to go install ruby-oci8 🙂

Brian.

> **···**
>
> On Sat, Mar 31, 2007 at 09:21:51PM +0900, Ma Ha wrote:
