I thought I had the gem mysql installed for months, until recently working in a project with Sinatra and Sequel I discover it wasn’t working. That is because Rails uses another adapter if that one is not available.
So to install it properly in Leopard is not so easy as other gems:
If you did
sudo gem install mysql
Must be
sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config
(make sure that is your mysql path)
If mysql.bundle looks for the dylib file in the wrong place. To change it:
sudo install_name_tool -change /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib /usr/local/mysql/lib/libmysqlclient.15.dylib /opt/local/lib/ruby/gems/1.8/gems/mysql-2.7/lib/mysql.bundle
Again make sure that are your paths to MySQL and Ruby. I used Macports to install Ruby, that’s why I have it in /opt/. You could have it in /urs/.












