ERROR: Failed to build gem native extension (mysql2 on rails 3.2.3)
From https://github.com/brianmario/mysql2/issues/8
just copied this in the console
sudo apt-get install mysql-client libmysqlclient-dev
and worked!!
I used Homebrew for Mac to install mysql:
brew install mysql
Then I used a gem command to install the mysql2 gem:
sudo gem install mysql2
This is mostly due to lack of mysql headers, Try to install mysql developer (mysql-devel) packages
Normally this error comes when 'libmysqlclient-dev' package is missing
- if you are on linux try this link
- if you are on windows this url might help you