# Problem installing MySQL driver for OS X Tiger using RubyGem

**URL:** <https://www.ruby-forum.com/t/problem-installing-mysql-driver-for-os-x-tiger-using-rubygem/49200>\
**Category:** Rails\
**Created:** [December 1, 2005, 8:58am UTC](https://www.ruby-forum.com/t/problem-installing-mysql-driver-for-os-x-tiger-using-rubygem/49200 "2005-12-01T08:58:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![untz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/ad7895/32.png) [@untz](https://www.ruby-forum.com/u/untz)\
**Post date:** [December 1, 2005, 8:58am UTC](https://www.ruby-forum.com/t/problem-installing-mysql-driver-for-os-x-tiger-using-rubygem/49200/1 "2005-12-01T08:58:03Z")

</div>

Hello there,

I am experiencing a problem installing the Ruby MySQL driver for OS X  
Tiger using RubyGems…

When I tried to install the mysql driver, I received the following  
error message:

Raven:~ untz$ sudo su root  
Password:  
Raven:/Users/untz root# gem install mysql  
Attempting local installation of ‘mysql’  
Local gem file not found: mysql\*.gem  
Attempting remote installation of ‘mysql’  
Building native extensions. This could take a while…  
\*\*\* extconf.rb failed \*\*\*  
Could not create Makefile due to some reason, probably lack of  
necessary libraries and/or headers. Check the mkmf.log file for more  
details. You may need configuration options.

Provided configuration options:  
–with-opt-dir  
–with-opt-include=${opt-dir}/include  
–with-opt-lib=${opt-dir}/lib  
–with-make-prog=make  
–srcdir=.  
–curdir  
–ruby=/usr/local/bin/ruby  
–with-mysql-config  
–with-mysql-dir=/usr/local  
–with-mysql-include=${mysql-dir}/include  
–with-mysql-lib=${mysql-dir}/lib  
–with-mysqlclientlib=mysqlclient  
–with-mlib=m  
–with-mysqlclientlib=mysqlclient  
–with-zlib=z  
–with-mysqlclientlib=mysqlclient  
–with-socketlib=socket  
–with-mysqlclientlib=mysqlclient  
–with-nsllib=nsl  
–with-mysqlclientlib=mysqlclient  
ERROR: While executing gem … (RuntimeError)  
ERROR: Failed to build gem native extension.  
Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/  
mysql-2.7 for inspection.  
ruby extconf.rb install mysql\nchecking for mysql\_query() in -  
lmysqlclient… no  
checking for main() in -lm… yes  
checking for mysql\_query() in -lmysqlclient… no  
checking for main() in -lz… yes  
checking for mysql\_query() in -lmysqlclient… no  
checking for main() in -lsocket… no  
checking for mysql\_query() in -lmysqlclient… no  
checking for main() in -lnsl… no  
checking for mysql\_query() in -lmysqlclient… no

BTW, I am using MySQL 5 Community Edition database engine installed  
in /usr/local/

Many, many thanks!

-Unnsse

---

<div class="post-metadata">

**Author:** ![untz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/ad7895/32.png) [@untz](https://www.ruby-forum.com/u/untz)\
**Post date:** [December 1, 2005, 9:18am UTC](https://www.ruby-forum.com/t/problem-installing-mysql-driver-for-os-x-tiger-using-rubygem/49200/2 "2005-12-01T09:18:16Z")

</div>

Try using:

sudo gem install mysql – --with-mysql-config

Cheers!

-DF

---

<div class="post-metadata">

**Author:** ![untz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/ad7895/32.png) [@untz](https://www.ruby-forum.com/u/untz)\
**Post date:** [December 1, 2005, 10:11pm UTC](https://www.ruby-forum.com/t/problem-installing-mysql-driver-for-os-x-tiger-using-rubygem/49200/3 "2005-12-01T22:11:03Z")

</div>

David,

Thanks this worked!

Here’s the positive feedback:

make install  
mkdir -p /usr/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib  
/usr/bin/install -c -m 0755 mysql.bundle /usr/local/lib/ruby/gems/1.8/  
gems/mysql-2.7/lib  
Successfully installed mysql-2.7

Now, my question is… I am using MySQL 5 Community Edition and would  
like to know if this driver (I’m a bit confused since this driver is  
version 2.7)  
will work with it?

Kindest regards,

Unnsse

---

<div class="post-metadata">

**Author:** ![untz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/ad7895/32.png) [@untz](https://www.ruby-forum.com/u/untz)\
**Post date:** [December 1, 2005, 11:36pm UTC](https://www.ruby-forum.com/t/problem-installing-mysql-driver-for-os-x-tiger-using-rubygem/49200/4 "2005-12-01T23:36:13Z")

</div>

Hi Unnsse - according to the library’s webpage:

[http://www.tmtm.org/en/mysql/ruby/](http://www.tmtm.org/en/mysql/ruby/)

It should support MySQL 4.0.22/4.1.13/5.0.11

Good luck!

-DF
