Installing mysql gem on Leopard
Posted by Marcus Wyatt on 26 November 2008
If you ever get an error when installing the mysql gem on Leopard, then you should use the following command that worked for me:
sudo gem install mysql −− −−with−mysql−config≡/usr/local/mysql/bin/mysql_config
CrazyRails on his blog suggest using the following command if the above command doesn’t work:
sudo gem install mysql −− −−with−mysql−lib≡/usr/local/mysql/lib
Enjoy!






Akhil Bansal said
Try considering http://webonrails.com/2008/08/07/leopard-sucks-while-installing-updating-gems/. If installation of gems on leopard is too slow.
mytaskhelper said
Hi, all
The only one thing, which actually works for me:
sudo gem install mysql — –with-mysql-config=`which mysql_config5`
Thank you,
Sincerely,
Igor,
http://www.MyTaskHelper.com
Steven said
If you are using MacPorts’ MySQL:
sudo gem install mysql — –with-mysql-config=/opt/local/bin/mysql_config5
Pete said
This is the only thing that worked for me (assuming you have the mysql package installed from http://www.mysql.com)
sudo env ARCHFLAGS=”-arch i386″ gem install mysql — –with-mysql-config=/usr/local/mysql/bin/mysql_config
From:
http://weblog.rubyonrails.org/2007/10/26/today-is-leopard-day
Pete said
Just realized that double dashes are being converted to a single long dash on your site. That might actually be why it didn’t work.
Marcus Wyatt said
Man, I can tell you that the last two nights I had a hell of a time with this gem. There was just no way it wanted to install. So I had to manually build the C-extension and install it. Not fun…