OSX 10.7 Lion 上的 MySQL gem

MySQL gem on OSX 10.7 Lion(OSX 10.7 Lion 上的 MySQL gem)
本文介绍了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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Hibernate reactive No Vert.x context active in aws rds(AWS RDS中的休眠反应性非Vert.x上下文处于活动状态)
Bulk insert with mysql2 and NodeJs throws 500(使用mysql2和NodeJS的大容量插入抛出500)
Flask + PyMySQL giving error no attribute #39;settimeout#39;(FlASK+PyMySQL给出错误,没有属性#39;setTimeout#39;)
auto_increment column for a group of rows?(一组行的AUTO_INCREMENT列?)
Sort by ID DESC(按ID代码排序)
SQL/MySQL: split a quantity value into multiple rows by date(SQL/MySQL:按日期将数量值拆分为多行)