Type this:
sudo gem install mysql -- --with-mysql-config=/opt/local/bin/mysql_config5
not:
sudo gem install mysql -- --with-mysql-config /opt/local/bin/mysql_config5
so. lame.