# Confused about Ruby database interfaces available on rubyfor

**URL:** <https://www.ruby-forum.com/t/confused-about-ruby-database-interfaces-available-on-rubyfor/95046>\
**Category:** Ruby\
**Created:** [May 20, 2006, 12:36am UTC](https://www.ruby-forum.com/t/confused-about-ruby-database-interfaces-available-on-rubyfor/95046 "2006-05-20T00:36:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![alan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a87d85/32.png) [@alan](https://www.ruby-forum.com/u/alan)\
**Post date:** [May 20, 2006, 12:36am UTC](https://www.ruby-forum.com/t/confused-about-ruby-database-interfaces-available-on-rubyfor/95046/1 "2006-05-20T00:36:56Z")

</div>

Hi,

I am trying use Ruby to access to our Oracle database on our windows XP  
and Linux machines.  
I also prefer to use DBI interface.

I have downloaded dbi-0.1.0.tar.gz from this location:  
[http://rubyforge.org/frs/?group\_id=234&release\_id=4323](http://rubyforge.org/frs/?group_id=234&release_id=4323)

dbi-0.1.0.tar.gz doesnâ??t have the OCI8 dbd driver and the installer  
doesnâ??t work. I struggled and finally managed to copy files manually and  
make ODBC and ADO DBDs work on windows only.

I cannot introduce this to my client as a multiplatform scripting  
solution for accessing to our database! It is a mess!!!

From the other side, there is Ruby/OCI8 available here:  
[http://www.jiubao.org/ruby-oci8/](http://www.jiubao.org/ruby-oci8/)  
Is this something than I can combine with DBI to have the DBD::OCI8?

I apologize if I sound a little bit frustrated. I am looking for a  
reliable Ruby database access solution. I have posted question here (see  
[ODBC Database Connectivity - Ruby - Ruby-Forum](http://www.ruby-forum.com/topic/64065#70882)) and it seems people using  
DBI just fine. I donâ??t know how come I cannot find right package to  
download and use!!!

Any help would be appreciated,  
Alan

---

<div class="post-metadata">

**Author:** ![alan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a87d85/32.png) [@alan](https://www.ruby-forum.com/u/alan)\
**Post date:** [May 20, 2006, 6:55pm UTC](https://www.ruby-forum.com/t/confused-about-ruby-database-interfaces-available-on-rubyfor/95046/2 "2006-05-20T18:55:05Z")

</div>

On 5/20/06, Alan [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> From the other side, there is Ruby/OCI8 available here:  
> [http://www.jiubao.org/ruby-oci8/](http://www.jiubao.org/ruby-oci8/)  
> Is this something than I can combine with DBI to have the DBD::OCI8?

Yes. In order to get Ruby’s DBI to work with Oracle, you need to  
install both Ruby-DBI and Kubo-san’s Ruby-OCI8 module (which includes  
the DBD driver). Note that you’ll probably also need at the very least  
the Oracle Instant Client [1] in order to build the OCI8 module.

> I apologize if I sound a little bit frustrated. I am looking for a  
> reliable Ruby database access solution. I have posted question here (see  
> [ODBC Database Connectivity - Ruby - Ruby-Forum](http://www.ruby-forum.com/topic/64065#70882)) and it seems people using  
> DBI just fine. I don’t know how come I cannot find right package to  
> download and use!!!

Don’t panic… I think this just ought to be better documented.

So the steps are:

1. Download the Instant Client libraries and _install them properly_  
with the correct values for the ORACLE\_HOME and LD\_LIBRARY\_PATH  
environment variables set. Best to put these in your system  
/etc/profile; if these variables aren’t properly set, no program using  
the instant client libraries will function correctly (this is not a  
Ruby issue, but an Oracle issue)
2. Download and install Ruby-DBI
3. Download and install the Ruby-OCI8 package.

Since I have almost never programmed Ruby on Windows, and have never  
written a Windows program to access an Oracle database, I’m sorry I  
can’t help on that end.

[1]

> **[Get the latest product technical information from Oracle](https://www.oracle.com/technical-resources/)**
>
> Oracle Technical Resources provides services and resources to help developers, DBAs, and architects build, deploy, manage, and optimize applications
