After wrestling with this problem for several days I finally got it nailed. 2 things that I have done that made it work:
1. sudo env ARCHFLAGS="-arch x86_64" gem install --no-rdoc --no-ri mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config 2. export DYLD_LIBRARY_PATH="/usr/local/mysql/lib:$DYLD_LIBRARY_PATH"
I'm on Snow Leopard, and have only 1 MySQL (x86_64) 5.5, and 1 ruby (prepackaged with Snow Leopard) installed.