# DBI - error loading driver

**URL:** <https://www.ruby-forum.com/t/dbi-error-loading-driver/119879>\
**Category:** Ruby\
**Created:** [November 11, 2007, 8:43pm UTC](https://www.ruby-forum.com/t/dbi-error-loading-driver/119879 "2007-11-11T20:43:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wpvanpaassen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/6f9a4e/32.png) [@wpvanpaassen](https://www.ruby-forum.com/u/wpvanpaassen)\
**Post date:** [November 11, 2007, 8:43pm UTC](https://www.ruby-forum.com/t/dbi-error-loading-driver/119879/1 "2007-11-11T20:43:03Z")

</div>

I installed the DBI package so that I could write Ruby scripts that  
access MySQL databases. When I attempt to run a test script, I get the  
following error:

/usr/local/lib/site\_ruby/1.8/dbi.rb:344:in `load_driver': Could not load driver (no such file to load -- mysql) (DBI::InterfaceError) from /usr/local/lib/site_ruby/1.8/dbi.rb:227:in `\_get\_full\_driver’  
from /usr/local/lib/site\_ruby/1.8/dbi.rb:213:in `connect’  
from /root/bin/simple.rb:6

I used the instructions at this link:

[www.kitebird.com/articles/rubi-dbi.html](http://www.kitebird.com/articles/rubi-dbi.html)

Can anyone help me figure out what the problem is?  
Thanks…

---

<div class="post-metadata">

**Author:** ![wpvanpaassen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/6f9a4e/32.png) [@wpvanpaassen](https://www.ruby-forum.com/u/wpvanpaassen)\
**Post date:** [November 11, 2007, 8:59pm UTC](https://www.ruby-forum.com/t/dbi-error-loading-driver/119879/2 "2007-11-11T20:59:34Z")

</div>

you need to install the ruby-mysql module

[http://www.kitebird.com/articles/ruby-mysql.html](http://www.kitebird.com/articles/ruby-mysql.html)

you also need MySQL C client API header files and libraries installed

it would be a good idea to know where your mysql libs are before  
attempting to configure

---

<div class="post-metadata">

**Author:** ![wpvanpaassen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/6f9a4e/32.png) [@wpvanpaassen](https://www.ruby-forum.com/u/wpvanpaassen)\
**Post date:** [November 11, 2007, 9:06pm UTC](https://www.ruby-forum.com/t/dbi-error-loading-driver/119879/3 "2007-11-11T21:06:54Z")

</div>

Thanks Kristopher…

Windham, Kristopher R. wrote:

> you need to install the ruby-mysql module
> 
> [http://www.kitebird.com/articles/ruby-mysql.html](http://www.kitebird.com/articles/ruby-mysql.html)
> 
> you also need MySQL C client API header files and libraries installed
> 
> it would be a good idea to know where your mysql libs are before  
> attempting to configure
