Installing MySQL Gem on Leopard with MacPorts Mysql
The MySQL Gem won’t install directly on a Leopard machine using a Macports install of mysql (or any other MySQL install method I can think of) because by default gem will try built a universal gem, however the MySQL install will only have libraries for your current platform. So we need to force the architecture the gem is built for.
To install on a Intel Machine:
1 | sudo bash -c "ARCHFLAGS='-arch i386' gem install mysql -- --with-mysql-config=/opt/local/bin/mysql_config5" |
To install on a PowerPC Machine:
1 | sudo bash -c "ARCHFLAGS='-arch i386' gem install mysql -- --with-mysql-config=/opt/local/bin/mysql_config5" |
Make sure you select the newest ruby (not mswin32) version.
If you are not using a Macports MySQL Install, find where mysql_config lives and update the above command.
More info on the bundled Ruby under Leopard can be found here: http://trac.macosforge.org/projects/ruby/wiki/WhatsNewInLeopard
Finally, this worked for me, thanks
Awesome, finally got this gem to install. Thanks a lot!