Monday, November 23, 2009

Quick Solution: MySQL gem on Snow Leopard

A few days ago I got the following error on a Rails application (after installing the mysql gem) on Snow Leopard:

Error: uninitialized constant MysqlCompat::MysqlRes


If you ever encounter this problem, uninstall the gem and reinstall it in the following way:

ARCHFLAGS="-arch i386 -arch x86_64" gem install mysql -- --with-mysql-dir=/path/to/mysql/dir/ --with-mysql-config=/path/to/mysql/dir/bin/mysql_config


[Solution taken from here]

0 comments: