MySQL OS X 10.7 Lion上的宝石 [英] MySQL gem on OSX 10.7 Lion

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

问题描述

有没有人得到MySQL Gem 2.8.1。在OSX 10.7上工作?



我已经安装了MySQL 5.5.13 64位,并在成功安装MySQL之后尝试了以下操作:

  env ARCHFLAGS = -  arch x86_64gem 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 - 我得到这个:

 未初始化的常量MysqlCompat :: MysqlRes 

任何想法如何解决这个问题?

解决方案

我一直在努力解决这个问题。上述两个指针工作。以下是我所做的:


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



    export DYLD_LIBRARY_PATH =/ usr / local / mysql / lib:$ DYLD_LIBRARY_PATH


  2. <执行此操作:
    $ b

    env ARCHFLAGS = - arch x86_64sudo 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



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

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

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. Added to .zshrc or your .bash_profile:

    export DYLD_LIBRARY_PATH="/usr/local/mysql/lib:$DYLD_LIBRARY_PATH"

  2. Executed this:

    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

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

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