I\'m having the exact issue as described in this question: MYSQL Installation Troubles. Unfortunately none of the answers helped me (and it\'s closed).
I try to learn
Are you on snow leopard? You have to execute the C dependencies compiles with x64 headers, try:
sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config