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
I had the same problem. I solved installing first the adapter:
gem install activerecord-mysql2-adapter
Then, install mysql2 gem using
sudo gem install mysql2 -- --with-mysql-config=/usr/local/mysql/bin/mysql_config