- 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"
Thank you a lot for your blog post, you helped me a lot!December 19, 2008 12:59 PM
Johannes Fahrenkrug said...
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.
Why not just:
sudo gem install mysql -- --with-mysql-config=/opt/local/bin/mysql_config5
mysql_config will give you everything else you need