mysql ruby gem problems on OSX
To get mysql ruby gem working on leopard with default leopard ruby and mysql’s binary distro.
1) Firstly need to make the gem as intel only not fat (cause probably don’t have libraries to make the PPC version - and in any case, why?)
sudo su -
ARCHFLAGS='-arch i386' gem install mysql — –with-mysql-config=/usr/local/mysql/bin/mysql_config
read more about this at:
http://www.gregbenedict.com/2008/02/21/mysql-ruby-gem-install-issues-solved/
2) Secondly need to fix some internal magic name:
sudo install_name_tool -change /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib /usr/local/mysql/lib/libmysqlclient.15.dylib /Library/Ruby/Gems/1.8/gems/mysql-2.7/lib/mysql.bundle
read more about this one at: http://installingcats.com/2007/12/13/mysql-ruby-gem-install-problem-on-mac-os-x-leopard/