Did anyone got the MySQL gem 2.8.1. working on OSX 10.7 ?
I’ve installed MySQL 5.5.13 64bit and tried the following after the successful installation of MySQL:
env ARCHFLAGS="-arch x86_64" gem install mysql -v='2.8.1' -- --with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib --with-mysql-include=/usr/local/mysql/include --with-mysql-config=/usr/local/mysql/bin/mysql_config
When running a rake command – let’s say rake db:migrate – I get this:
uninitialized constant MysqlCompat::MysqlRes
Any idea how to fix that?
I had been struggling with this issue. The two above pointers worked. Here is what I did:
Added to .zshrc or your .bash_profile:
export DYLD_LIBRARY_PATH="/usr/local/mysql/lib:$DYLD_LIBRARY_PATH"Executed this:
env ARCHFLAGS="-arch x86_64" sudo gem install mysql -v='2.8.1' -- --with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib --with-mysql-include=/usr/local/mysql/include --with-mysql-config=/usr/local/mysql/bin/mysql_config