I’ve just upgraded to Snow Leopard, and as a result, have had to reinstall my MySQL gem for Rails. On OSX, this is never easy, as the sheer number of blog posts offering advice will show. Having tried all the different solutions I could find, this is how I managed it. Note that because I am on a Core Duo machine (not a Core 2 Duo), I didn’t upgrade to the 64 bit version of MySQL.
Open up a Terminal, and edit the .profile file, to add the following to modify your path:
sudo sh env ARCHFLAGS="-arch i386" gem install mysql
You might see a load of warnings, but as long as it doesn’t fail, then they’re not too important. You can check it’s worked by running:
gem list -d mysql
This way you don’t need to bother with all the setting mysql_config flags. Or, at least, I didn’t need to. Hopefully this will work for you!