如何在OS X 10.5.4下安装mysql ruby​​ gem [英] How do I install the mysql ruby gem under OS X 10.5.4

查看:94
本文介绍了如何在OS X 10.5.4下安装mysql ruby​​ gem的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是交易。

$ gem --version


<1.1>


$ sudo gem install mysql - --with-mysql-config = / usr / local / mysql / bin / mysql_config


批量更新Gem源代码索引:
http ://gems.rubyforge.org/ 错误:
在本地或
存储库中找不到mysql


$ sudo gem update


更新已安装的宝石批量更新
宝石源索引:
< a href =http://gems.rubyforge.org/ =nofollow noreferrer> http://gems.rubyforge.org/



更新
RedCloth错误:在执行gem
...时(Gem :: GemNotFoundException)
在本地或存储库中找不到RedCloth


我试过这个 this 这个,还有其他一些。



他们都没有为我工作。有其他人有这个问题吗?如果是的话你做了什么来解决上面没有提到的问题?

解决方案

首先,Orion Edwards说确保你有rubygems 1.2。不幸的是,


gem update --system



<没有为我工作。



相反,我不得不:


  1. 手动下载 ruby​​gems-update-1.2.0 from ruby​​forge。

  2. $ sudo gem install /path/to/rubygems-update-1.2.0.gem

  3. $ update_rubygems

现在我已经拥有了rubygems 1.2我跑了


$ sudo gem install mysql - with-mysql-config = / usr / local / mysql / bin / mysql_config

一切正常。感谢Orion Edwards将我引向正确的方向。

Here is the deal.

$ gem --version

1.1.0

$ sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

Bulk updating Gem source index for: http://gems.rubyforge.org/ ERROR: could not find mysql locally or in a repository

$ sudo gem update

Updating installed gems Bulk updating Gem source index for: http://gems.rubyforge.org/

Updating RedCloth ERROR: While executing gem ... (Gem::GemNotFoundException) could not find RedCloth locally or in a repository

I've tried this, this, this, this, and a ton of others.

None of them have worked for me. Is anyone else having this problem? If so what did you do to fix it that is not mentioned above?

解决方案

First of all as Orion Edwards said make sure you have rubygems 1.2. Unfortunately,

gem update --system

did not work for me.

Instead I had to:

  1. Manually download rubygems-update-1.2.0 from rubyforge.
  2. $ sudo gem install /path/to/rubygems-update-1.2.0.gem
  3. $ update_rubygems

Now that I had rubygems 1.2 I ran

$ sudo gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config

Everything is working. Thanks Orion Edwards for steering me in the right direction.

这篇关于如何在OS X 10.5.4下安装mysql ruby​​ gem的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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