Rails-MySQL Error - uninitialized constant MysqlCompat::MysqlRes

℡╲_俬逩灬. 提交于 2019-12-02 07:21:17

Not had the experience myself and I'm using Snow Leopard, RVM and rails 2.3.5 to 3.0.3, but found another view which deals with the uninstall and reinstall via :

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

For more details see the posting at: http://accidentaltechnologist.com/apple/fixing-uninitialized-constant-mysqlcompatmysqlres-error-on-snow-leopard/

For El Capitan you don't need to uninstall / install.

Just found your libmysqlclient.18.dylib file. Location will depent on how you installed mysql

locate libmysqlclient.18.dylib

Once you have the path create a symb link as:

ln -s /usr/local/mysql-5.5.20-osx10.6-x86_64/lib/libmysqlclient.18.dylib /usr/local/lib/libmysqlclient.18.dylib

You have two change first param according to your dynamic library location (use the first command).

On El Capitan the link should be to /usr/local/lib. On previous versions link was to /usr/lib/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!