Installing MySQL Ruby gem on Leopard
Noted for myself and others for future reference.
Posted on 2008-11-14 15:52 by Jørn Støylen [permalink]
Today I upgraded to Leopard, and wanted to install the MySQL Ruby gem, like so:
sudo gem install mysql
I got errors, though:
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb install mysql -- --with-mysql-dir=/usr/local/mysql/bin/
checking 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
*** extconf.rb failed ***
Then I found this advice:
Try this:
$ sudo gem install mysql -- --with-mysql-config
And yay, that worked!
Comments closed
Commenting is closed for this article.

