Ubuntu Ruby on Rails环境中连接MySQL时出错解决方案
时间:2014-12-06 00:48 来源:linux.it.net.cn 作者:IT
在Ubuntu系统中,Ruby on Rails环境中,安装MySQL后,连接数据库会出错,经常出现如下信息:
Uninitialized Constant MysqlCompat::MysqlRes
具体处理方式是,先删除安装好的MYSQL:
sudo gem uninstall mysql
然后执行如下代码:
export ARCHFLAGS="-arch i386 -arch x86_64"
sudo gem install --no-rdoc --no-ri mysql -- --with-mysql-dir=/usr/local/mysql --with-mysql-config=/usr/local/mysql/bin/mysql_config
然后,这个问题就解决了。
(责任编辑:IT)
在Ubuntu系统中,Ruby on Rails环境中,安装MySQL后,连接数据库会出错,经常出现如下信息:
sudo gem install --no-rdoc --no-ri mysql -- --with-mysql-dir=/usr/local/mysql --with-mysql-config=/usr/local/mysql/bin/mysql_config
|