我正在尝试升级需要rails-2.3.5的rails应用程序,而这似乎需要rack-1.0.1。以下各项的许多(很多!)尝试都没有奏效:
# gem install rails -v=2.3.5
ERROR: could not find gem rails locally or in a repository
或
# gem install rails -v=2.3.5 --source http://gems.rubyforge.org
WARNING: RubyGems 1.2+ index not found for:
http://gems.rubyforge.org/
RubyGems will revert to legacy indexes degrading performance.
Bulk updating Gem source index for: http://gems.rubyforge.org/
ERROR: While executing gem ... (Gem::RemoteSourceException)
Error fetching remote gem cache: SocketError: getaddrinfo: Name or service not known (http://gems.rubyforge.org/yaml)
或代替http://gems.rubyonrails.org。当我尝试http://gems.github.org时,我收到索引错误。
只需尝试gems update rails
成功作为命令,但它会安装版本2.3.3。
为什么这些都不起作用?
供参考:
# cat /root/.gemrc
---
:benchmark: false
:verbose: true
:update_sources: true
:sources:
- http://gems.rubyonrails.org
- http://gems.opscode.com
:bulk_threshold: 1000
:backtrace: false
(安装程序真的是版本2吗?)
答案 0 :(得分:0)
我在两(2)小时后回来并且:
# gem install rails -v=2.3.5 --source http://gems.rubyforge.org
Successfully installed activesupport-2.3.5
Successfully installed activerecord-2.3.5
Successfully installed rack-1.0.1
Successfully installed actionpack-2.3.5
Successfully installed actionmailer-2.3.5
Successfully installed activeresource-2.3.5
Successfully installed rails-2.3.5
7 gems installed
...
有效。
真的很奇怪。如果错误消息可以提供更多信息,那将是很好的。