Monday, December 23, 2013

Getting mysql2 gem installed on OS X 10.9

Basically, I had the issue described here: http://www.randomactsofsentience.com/2013/05/gem-install-mysql2-missing-mysqlh-on-os.html

The important hint for me was to check mkmf.log (deep under under ~/.rvm, as I'm using rvm).

The error I got was that the '-arch' flag wasn't recognized by the C compiler. I removed the flag from /usr/local/mysql/bin/mysql_config, around line 120), then it compiled okay.

This isn't a perfect solution, as I probably broke mysql_config when using another compiler (currently I'm using /usr/bin/cc):

$ cc --version
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix