Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install MySQL gem on Mac OS X

What do I need to install mysql gem on Mac OS X ? I'm getting error "failed to build native extensions".

like image 518
synapse Avatar asked Feb 11 '11 08:02

synapse


2 Answers

I installed MySQL with Homebrew and I had to use this to finally be able to upgrade the gem:

gem install mysql2 -- --with-mysql-dir=/usr/local/opt/mysql/
like image 133
tirdadc Avatar answered Sep 23 '22 16:09

tirdadc


I'm using Mac OS X 10.10 (Yosemite), and to me worked with the command bellow:

gem install mysql2 -- \ --with-mysql-config=/usr/local/mysql/bin/mysql_config
like image 44
Maciel Escudero Bombonato Avatar answered Sep 22 '22 16:09

Maciel Escudero Bombonato