Wednesday, December 15, 2010

installing mysql2 gem on osx info from stackoverflow.com


You need the MySQL development headers for mysql2 to properly compile. This is needed, because much of the functionality is written in C and subsequently linked against MySQL.
A solution is to either point the gem installer to your mysql install folder explicitly like so
gem install mysql2 -- --with-mysql-dir=/usr/local/mysql# or where ever you installed your mysql server to
or by installing a mysql server to a known location (e.g. by using homebrew.) and then installing the gem
# install the mysql server locally
brew install mysql# install the gem
gem install mysql2
Both approaches require you to have XCode installed to have the required GCC compiler.

No comments:

Post a Comment