# Question about Ruby and databases

**URL:** <https://www.ruby-forum.com/t/question-about-ruby-and-databases/123562>\
**Category:** Ruby\
**Created:** [December 18, 2007, 8:13pm UTC](https://www.ruby-forum.com/t/question-about-ruby-and-databases/123562 "2007-12-18T20:13:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![skycube](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ba8739/32.png) [@skycube](https://www.ruby-forum.com/u/skycube)\
**Post date:** [December 18, 2007, 8:13pm UTC](https://www.ruby-forum.com/t/question-about-ruby-and-databases/123562/1 "2007-12-18T20:13:21Z")

</div>

Hello all,

I am new to Ruby (actually I used Ruby a few years back, but because  
of  
certain personal situations I stopped learning Ruby). I have a question  
concerning Ruby and databases. I’ve read that the best way to access  
databases is to use Ruby::DBI module. However, when I downloaded it  
from  
Ruby-Forge, the tar.gz file contained a simple Ruby script called  
“dbi-0.1.1”.  
The script begins with the line:

require “dbi”

And why would the dbi module contain a line that includes “dbi”?  
Obviously  
something must be wrong. I then went to the Sourceforge download page.  
The  
version there was old (0.0.21), but it contained a lot of other scripts.  
including a setup script. Now, I haven’t run this scripts, but this  
older  
version seems more complete. However, being an old version, will it  
work  
with the latest versions of say, MySQL? So the question is: where to do  
I  
download the latest complete distribution of Ruby::DBI, because the one  
at  
Ruby Forge (the supposed official homepage) seems to be incomplete).

Any info on this will be greatly appreciated.

Sincerely,  
Omar

---

<div class="post-metadata">

**Author:** ![skycube](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ba8739/32.png) [@skycube](https://www.ruby-forum.com/u/skycube)\
**Post date:** [December 19, 2007, 2:01pm UTC](https://www.ruby-forum.com/t/question-about-ruby-and-databases/123562/2 "2007-12-19T14:01:06Z")

</div>

Omar C. wrote:

> Any info on this will be greatly appreciated.

It seems to work fine for me.

[http://rubyforge.org/frs/download.php/8264/ruby-db2-0.4.4.tar.gz](http://rubyforge.org/frs/download.php/8264/ruby-db2-0.4.4.tar.gz)

ruby setup.rb config  
ruby setup.rb setup  
ruby setup.rb install

Maybe this helps? – [http://www.kitebird.com/articles/ruby-dbi.html](http://www.kitebird.com/articles/ruby-dbi.html)

HTH

Regards,  
Lee
