- Install mysql5-devel with MacPorts:
sudo port install mysql5-devel
- Install the native MySQL gem like so:
sudo bash -c "ARCHFLAGS='-arch i386' sudo gem install mysql -- --with-mysql-include=/opt/local/include/mysql5/mysql/ --with-mysql-lib=/opt/local/lib/mysql5/mysql/ --with-mysql-config=/opt/local/bin/mysql_config5"
- Done
This great article immensely helped me with this.
If this was useful for you, please take a minute and recommend me:
Thank you!
Comments
Johannes Fahrenkrug said...
Hi Bryan,
thank you, if that works: great!
I just read in some places that specifying the ARCHFLAGS might help as well. But the other two args really do seem obsolete if you specify with-mysql-config.
- Johannes
bryanl said...
Why not just:
sudo gem install mysql -- --with-mysql-config=/opt/local/bin/mysql_config5
mysql_config will give you everything else you need
Anonymous said...
Thank you a lot for your blog post, you helped me a lot!
December 19, 2008 12:59 PM