Error while install mysql2 ruby gem

How to fix “An error occurred while installing mysql2 (*)” when install mysql2 ruby gem ? The solution is just run this command on your terminal :

On Ubuntu :

$ sudo apt-get install libmysqlclient-dev

On Redhat / Centos / Fedora :

$ sudo yum install mysql-devel

On Mac OSX with Homebrew :

$ brew install mysql

Scroll to Top
%d bloggers like this: