OSX 10.7 Lion 上的 MySQL gem [英] MySQL gem on OSX 10.7 Lion

查看:34
本文介绍了OSX 10.7 Lion 上的 MySQL gem的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人得到了 MySQL gem 2.8.1.在 OSX 10.7 上工作?

Did anyone got the MySQL gem 2.8.1. working on OSX 10.7 ?

我已经安装了MySQL 5.5.13 64bit,安装成功后尝试如下:

I've installed MySQL 5.5.13 64bit and tried the following after the successful installation of MySQL:

env ARCHFLAGS="-arch x86_64" gem install mysql -v='2.8.1' -- --with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib --with-mysql-include=/usr/local/mysql/include --with-mysql-config=/usr/local/mysql/bin/mysql_config

当运行 rake 命令时 - 比如说 rake db:migrate - 我明白了:

When running a rake command - let's say rake db:migrate - I get this:

uninitialized constant MysqlCompat::MysqlRes

知道如何解决这个问题吗?

Any idea how to fix that?

推荐答案

我一直在努力解决这个问题.上述两个指针有效.这是我所做的:

I had been struggling with this issue. The two above pointers worked. Here is what I did:

  1. 添加到 .zshrc 或您的 .bash_profile:

  1. Added to .zshrc or your .bash_profile:

导出 DYLD_LIBRARY_PATH="/usr/local/mysql/lib:$DYLD_LIBRARY_PATH"

执行这个:

env ARCHFLAGS="-arch x86_64" sudo gem install mysql -v='2.8.1' -- --with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib --with-mysql-include=/usr/local/mysql/include --with-mysql-config=/usr/local/mysql/bin/mysql_config

这篇关于OSX 10.7 Lion 上的 MySQL gem的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆