To get mysql gem to work on OSX 10.6

Just a quick note. I lost an hour to fiddling about with this.

If you’re having trouble with the mysql gem version 2.8.1 on OSX 10.6 try uninstalling it and building it this way:

sudo gem uninstall mysql

export ARCHFLAGS="-arch i386 -arch x86_64" ; gem install --no-rdoc --no-ri mysql -- --with-mysql-dir=/usr/local --with-mysql-config=/usr/local/mysql/bin/mysql_config

The gem should build with no errors or warnings. The paths to mysql-dir and mysql-config are standard paths used by the mysql dmg, you might want to check your own paths first with:

which mysql_config

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>