I am trying to install mysql2:
sudo gem install mysql2 -v '0.2.7' -- --with-mysql-config=/usr/local/Cellar/mysql/5.5.25a/bin/mysql_config
I'm getting this error:
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb -- with-mysql-config=/usr/local/Cellar/mysql/5.5.25a/bin/mysql_config
checking for rb_thread_blocking_region()... no
checking for mysql.h... no
checking for mysql/mysql.h... no
-----
mysql.h is missing. please check your installation of mysql and try again.
-----
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
my mysql install is via brew so my mysql.h file is located at:
/usr/local/Cellar/mysql/5.5.25a/bin/mysql_config
which is why I have the with-mysql-config flag
The mysql_config file is looking for the mysql.h file here:
$basedir/include/mysql/mysql.h
it should be added that I updated my gemfile from
gem 'mysql2
to gem 'mysql2', '0.2.7'
because, I was getting some deprecation warning about the fact that mysql2 0.3.* didn't have active record support. So would either have to upgrade rails to 3.1 or downgrade mysql2. I chose the latter.
Should I edit the mysql_config or is there something else I can do to fix this? Thanks for any help.