linesofcode.com
Installing the MySQL gem on Snow Leopard
There are a lot of posts around with instructions on how to install the MySQL gem in Snow Leopard.
Some, force you to manually compile MySQL. Others don’t take into consideration that you install your gems with `sudo`
Provided you have the `mysql_config` executable in your PATH then the next line should do the trick and install the gem.
sudo env ARCHFLAGS="-arch i386 -arch x86_64" \
gem install --with-mysql-config=`which mysql_config`
The trick is to set ARCHFLAGS correctly not for the current shell, but for the `sudo` environment.