Taken straight from this blog
in a terminal.. First do a ‘locate mysql_config’ and then replace the path in the following command with where that file is.
$ sudo gem install mysql — –with-mysql-config=/usr/local/mysql/bin/mysql_config
Building native extensions. This could take a while…
Successfully installed mysql-2.7
1 gem installed