I leave this here for future reference as this is the typical thing you'll forget instantly and need always. If you install MySQL on Mac OS X Mountain Lion via brew, it will install all mysql files here:
First of all you need to be sure that your tools are working properly, issue the following command (Brew will alert you on missed or broken compilers, libraries or whatever):
$ brew doctor Your system is raring to brew.
Do anything brew says that you should do and then install your gem providing the actual mysql directory like this:
$ gem install mysql2 -- --with-mysql-dir=/usr/local/opt/mysql/