" gem install rails"在Windows上失败

时间:2014-04-08 21:55:29

标签: ruby-on-rails ruby

我正在尝试手动安装rails,但遇到以下错误:

c:\Ruby193\bin>gem install rails
ERROR:  Could not find a valid gem 'rails' (>= 0) in any repository
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    Errno::ETIMEDOUT: A connection attempt failed because the connected party 
did not properly respond after a period of time, or established connection failed
because connected host has failed to respond. - connect(2) (http://rubygems.org/
latest_specs.4.8.gz)

如何解决这个问题?

到目前为止我采取的步骤:

  • 我从这里安装了Ruby:http://rubyinstaller.org/downloads/, 从RubyInstaller部分运行Ruby 1.9.3-p545。 (成 C:\ Ruby193)
  • 我也安装了(用于Ruby 1.8.7和1.9.3):. DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe进入C:\ RubyDevKit。
  • 我在cmd中访问了RubyDevKit并输入了:
  dir dk.rb
  ruby dk.rb init
  ruby dk.rb install

  • 我启动了irb(在C:\ RubyDevKit中键入irb)来确认ruby 工作,它确实。

1 个答案:

答案 0 :(得分:-1)

我现在面对这个问题

重置DNS缓存为我解决了这个问题 (从cmd shell运行“ipconfig / flushdns”)

相关问题