本文介绍了我无法在Leopard中安装任何宝石或更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
bogon:〜zhulin $ ruby -v
ruby 1.8.6(2009-06-08 patchlevel 369)[universal-darwin9.0]
bogon: 〜Zhulin $ rails -v
Rails 1.2.6
bogon:〜Zhulin $ gems -v
-bash:gems:命令未找到
bogon:〜Zhulin $ sudo gem install heroku
密码:
错误:执行gem时...(Gem :: RemoteSourceException)
HTTP响应302提取http://gems.rubyforge.org/yaml
bogon: 〜Zhulin $ gem -v
1.0.1
bogon:〜Zhulin $ gem list
***本地GEMS ***
actionmailer( 1.3.6)
actionpack(1.13.6)
actionwebservice(1.2.6)
activerecord(1.15.6)
activesupport(1.4.4)
acts_as_ferret( 0.4.1)
capistrano(2.0.0)
cgi_multipart_eof_fix(2.5.0)
守护进程(1.0.9)
dnssd(0.6.0)
fastthread( 1.0.1)
fcgi(0.8.7)
雪貂(0.11.4)
gem_plugin(0.2.3)
高线(1.2.9)
hpricot( 0.6)
libxml-ruby(0.9.5,0.3.8.4)
杂种(1.1.4)
针(1.3.0)
net-sftp(1.1.0)
net-ssh(1.1.2)
rails(1.2.6)
rake(0.7.3)
RedCloth(3.0.4)
ruby-openid(1.1 .4)
ruby-yadis(0.3.4)
rubynode(0.1.3)
sqlite3-ruby(1.2.1)
termios(0.9.4)
bogon:〜Zhulin $ gem -update
错误:无效选项:-update。参见'gem --help'。
bogon:〜zhulin $ gem update --system
更新RubyGems ...
错误:执行gem时...(Gem :: RemoteSourceException)
HTTP响应302提取http ://gems.rubyforge.org/yaml
bogon:〜Zhulin $ gem install rubygems-update
错误:执行gem时(Gem :: RemoteSourceException)
HTTP响应302取回http://gems.rubyforge.org/yaml
bogon:〜Zhulin
任何人可以帮我弄明白吗?
解决方案如果你有Leopard,你可能会使用Ruby 1.8.7和Rails 2.3.10 。
更新您的Ruby,然后
gem update - 系统
(或者您可能需要从将其解压缩,然后运行 ruby setup.rb
来获得它)
之后,这些命令可以是
宝石列表
宝石列表-r导轨
宝石列表-r导轨$
宝石列表-rad rails $< - - 列出所有轨道,描述,远程
gem install haml
gem我fastercsv< - 'i'是安装的简写
gem i rails --no- rdoc --no-ri< - 如果您通过使用RVM创建
不同的gemsets来安装大量宝石,并且不希望每次使用
文档
sudo gem我sqlite3-ruby< - 在某些系统上,sudo是必需的,但如果
使用RVM并且您没有处理系统
宝石,建议不要使用sudo
bogon:~ Zhulin$ ruby -v
ruby 1.8.6 (2009-06-08 patchlevel 369) [universal-darwin9.0]
bogon:~ Zhulin$ rails -v
Rails 1.2.6
bogon:~ Zhulin$ gems -v
-bash: gems: command not found
bogon:~ Zhulin$ sudo gem install heroku
Password:
ERROR: While executing gem ... (Gem::RemoteSourceException)
HTTP Response 302 fetching http://gems.rubyforge.org/yaml
bogon:~ Zhulin$ gem -v
1.0.1
bogon:~ Zhulin$ gem list
*** LOCAL GEMS ***
actionmailer (1.3.6)
actionpack (1.13.6)
actionwebservice (1.2.6)
activerecord (1.15.6)
activesupport (1.4.4)
acts_as_ferret (0.4.1)
capistrano (2.0.0)
cgi_multipart_eof_fix (2.5.0)
daemons (1.0.9)
dnssd (0.6.0)
fastthread (1.0.1)
fcgi (0.8.7)
ferret (0.11.4)
gem_plugin (0.2.3)
highline (1.2.9)
hpricot (0.6)
libxml-ruby (0.9.5, 0.3.8.4)
mongrel (1.1.4)
needle (1.3.0)
net-sftp (1.1.0)
net-ssh (1.1.2)
rails (1.2.6)
rake (0.7.3)
RedCloth (3.0.4)
ruby-openid (1.1.4)
ruby-yadis (0.3.4)
rubynode (0.1.3)
sqlite3-ruby (1.2.1)
termios (0.9.4)
bogon:~ Zhulin$ gem -update
ERROR: Invalid option: -update. See 'gem --help'.
bogon:~ Zhulin$ gem update --system
Updating RubyGems...
ERROR: While executing gem ... (Gem::RemoteSourceException)
HTTP Response 302 fetching http://gems.rubyforge.org/yaml
bogon:~ Zhulin$ gem install rubygems-update
ERROR: While executing gem ... (Gem::RemoteSourceException)
HTTP Response 302 fetching http://gems.rubyforge.org/yaml
bogon:~ Zhulin$
Anyone can help me figure it out?
解决方案
If you have Leopard, you probably can use Ruby 1.8.7 with Rails 2.3.10.
Update your Ruby, and then
gem update --system
(or you might need to download RubyGems 1.3.7 from http://rubyforge.org/projects/rubygems/ unpack it, and run ruby setup.rb
to get it)
After that, the commands can be
gem list
gem list -r rails
gem list -r rails$
gem list -rad rails$ <-- list all rails, with description, remotely
gem install haml
gem i fastercsv <-- 'i' is a shorthand for install
gem i rails --no-rdoc --no-ri <-- if you install a lot of gems by creating
different gemsets using RVM, and don't want
the docs every time
sudo gem i sqlite3-ruby <-- on some systems, the sudo is needed, but if
using RVM and you are not dealing with "system"
gems, the recommendation is don't use "sudo"
这篇关于我无法在Leopard中安装任何宝石或更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!