Rough road rails 3.2.10 install mysql2

Start doing rails, take the environment process beginning is very smooth, but the code from the GIT back in running bundle install, I started to cry, all gem are installed on the left mysql2 this setup is not successful, valley. Suck ah, to search all solutions Linux use apt-get to install mysql2, after various attempts on mysql2 finally mounted on the OSX
The problem:
Building native extensions.  This could take a while...
ERROR:  Error installing mysql2:
    ERROR: Failed to build gem native extension.


Finally found the problem because there is no mysql.h file, through this prompt that mysql2 still has some dependent on MySQL install on OSX, so in accordance with the Linux Valley provides ideas, first install MySQL before installing mysql2

brew install mysql

bundle install


Get success.

Posted by Lorraine at January 15, 2014 - 1:22 PM