如何在OS X 10.5.4下安装mysql ruby gem [英] How do I install the mysql ruby gem under OS X 10.5.4
问题描述
$ 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
他们都没有为我工作。有其他人有这个问题吗?如果是的话你做了什么来解决上面没有提到的问题?
首先,Orion Edwards说确保你有rubygems 1.2。不幸的是,
gem update --system
<没有为我工作。
相反,我不得不:
- 手动下载 rubygems-update-1.2.0 from rubyforge。
- $ sudo gem install /path/to/rubygems-update-1.2.0.gem
- $ 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:
- Manually download rubygems-update-1.2.0 from rubyforge.
- $ sudo gem install /path/to/rubygems-update-1.2.0.gem
- $ 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屋!