Home > Database > Mysql Tutorial > body text

Ubuntu Ruby on Rails环境中连接MySQL时出错解决方案

WBOY
Release: 2016-06-07 16:56:32
Original
915 people have browsed it

在Ubuntu系统中,Ruby on Rails环境中,安装MySQL后,连接数据库会出错,经常出现如下信息:Uninitialized Constant MysqlCompat

在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

然后,这个问题就解决了!

linux

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!