PinoyTech.org

CodeIgniter, Kohana, Mootools, jQuery and CSS

How to fix uninitialized constant MysqlCompat::MysqlRes

Posted by teejay on January 23, 2012

I've never ever seen an error like this except on the current IMac I've been using. A few internet searches and I've finally found an answer.

The problem is that `libmysqlclient` can't be found. Here's a solution for those having this problem.

Type in the following on your command line.

export DYLD_LIBRARY_PATH="/usr/local/mysql/lib:$DYLD_LIBRARY_PATH"
This will set `DYLD_LIBRARY_PATH` to the correct one.

I've found another script that were supposed to fix the same issue:

export ARCHFLAGS="-arch i386 -arch x86_64"
sudo gem install --no-rdoc --no-ri -v=2.7 mysql -- --with-mysql-dir=/usr/local/mysql --with-mysql-config=/usr/local/mysql/bin/mysql_config

Categories: How To

Tags: ruby, rails, mysql

No Comments

Comments are not allowed