问题描述
有人得到了 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:
添加到 .zshrc 或您的 .bash_profile:
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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!