Really strange error installing mysql2 gem with rails3 on mac

I get this error:

Create your own extensions. It can take some time...

ERROR:  Error installing mysql:
    ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb --with-mysql-config=/Applications/MAMP/Library/bin/mysql_config
checking for mysql_ssl_set()... no
checking for rb_str_set_len()... no
checking for rb_thread_start_timer()... no
checking for mysql.h... no
checking for mysql/mysql.h... no
*** 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.

I tried everything here , but I still get the error. For some reason, when I run locate mysql_config, this is the result:

/Applications/MAMP/Library/bin/mysql_config /Applications/MAMP/Library/share/man/man1/mysql_config.1

I tried to run sudo gem install mysql2 -- –with-mysql config=/path/you/identified/above/mysql_configtwice using each path, but I still get the error from above. I downloaded the new version of MySql and I have Xcode, but I still get these errors. What am I doing wrong?

+3
source share
1 answer

​​ MAMP mysql? mysql, , mysql_config /usr/local/bin/mysql _config, :

sudo gem install mysql2 - -with-mysql-config ==/usr/local/bin/mysql_config

FYI, /Applications/MAMP/Library/share/man/man 1/mysql_config.1 . man mysql_config, .

, ? ( , )

sudo gem install mysql2 - -with-mysql-config =//MAMP/Library/bin/mysql_config

, , mysql, MAMP, . , mysql http://dev.mysql.com/downloads/mysql/, . , .

+2

All Articles