I am having a problem installing the mysql2 gem.
This comes up when I do gem install mysql2:
Marks-MacBook-Pro:~ Mark$ gem install mysql
I had the exact same issue and errors trying to install mysql2. I thought my mamp install of MySQL would work fine and spent a few hours playing around with paths to get that to work - no success.
Finally came across this post from ALoR and installed a fresh version through homebrew - however - be sure to follow ALL the instructions from homebrew! I missed a few steps and wasted another hour tracking down that problem - here are those instructions: https://stackoverflow.com/a/11061487/1241271
After MySQL was successfully installed, I ran: sudo gem install mysql2 and it worked like a charm.
Hope this helps someone from wasting several hours because they neglected to read the docs (newb mistake).