Logo Ruby9i Project Summary | JimCain.US

The Ruby9i Library

Ruby9i is a Ruby library that provides access to Oracle9i using the Oracle Call Interface. There are two APIs: the C extension in and the DBI::DBD-compatible interface defined in Ruby9i.rb.

A simple query using the API looks like this:

require 'ruby9i'
db ='databasename', 'username', 'password')
db.execute('SELECT city, state FROM friends') do |stmt|
puts stmt.column_names.join(', ')
stmt.fetch do |row|
puts row.join(', ')

I'm sure you can come up with some DBI examples on your own.


After being laid off in June 2003, I took a look at Ruby for the first time. My first impression was, "Wow! This is the language I would've written." I wanted to learn more about it, and since I had a lot of time on my hands, I decided to write a Ruby interface to Oracle9i. I had already done something similar for C++ a few years back, and it was a great learning experience. So, the day after reading Ruby's documentation for the first time, I dove right in.

Now in January 2004, I am newly employed as an Oracle9i DBA, and I have been wanting to use Ruby for some automation and scripting tasks—perfect motivation to return to the Ruby9i project. Besides, I'd like Ruby9i to be stable and complete just in time to be enhanced for 10g.

Design Goals

I would like the ability to use the latest features of Oracle, including:

Future Directions

For the sake of completeness, some day I might support the following, even though I currently do not use these features in Oracle:



Known Bugs

None that I know about


User Guide

A user guide is available. It was developed in XML using the DocBook DTD and XSL stylesheet, and I added some minor things to customize the appearance for Ruby. This customization is not yet complete, however. It's still missing support for things like blocks. Even so, you're welcome to download a tarball of the complete documentation set, including the XML and XSL, or just the HTML.

Mailing List

A mailing list is available.


The Ruby9i Library is licensed under the Artistic License.


Version Release Date
0.1.0 02-Jul-2003

I would appreciate any feedback you might have, especially since this is my first attempt at Ruby.

Last modified January 26, 2004. Send comments to