Wednesday, January 13, 2016

gem install mysql -v 0.3

ive issues with rails 4.1 that it does not play well with mysql2 v 0.4 .
im forced to use mysql2 v 0.3.20

when i ran gem install mysql -v 0.3.20
i came to this error:

errmsg.h is missing

ive already had mysql-dev installed.
after searching around, i found the issue.
cpanel mysql-config is still using mysql 5 dev library.
when i ran which mysql-config, and mysql-config, ive gotten cpanel 3rd party bin with v5.


so i renamed cpanel own mysql-config, and relink the correct mysql-config to cpanel/bin
mv /usr/local/cpanel/3rdparty/bin/mysql_config /usr/local/cpanel/3rdparty/bin/mysql_config5

ln -s /usr/bin/mysql_config /usr/local/cpanel/3rdparty/bin/mysql_config

reran gem install and bundle, and it works great now!


No comments: