安装红宝石宝石时超时 [英] Timeout when installing ruby gems
问题描述
我正在尝试使用 $ gem install bundler
安装 bundler gem.执行命令时,收到以下响应:
I'm trying to install the bundler gem using $ gem install bundler
. When I execute the command, I receive the following response:
ERROR: Could not find a valid gem 'bundler' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - Errno::ETIMEDOUT: Operation timed out - connect(2) (https://api.rubygems.org/latest_specs.4.8.gz)
ERROR: Possible alternatives: bundler
为了确保我不会发疯,我尝试安装了nokogiri:
In an effort to make sure I wasn't going crazy, I tried installing nokogiri:
ERROR: Could not find a valid gem 'nokogiri' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - Errno::ETIMEDOUT: Operation timed out - connect(2) (https://api.rubygems.org/latest_specs.4.8.gz)
ERROR: Possible alternatives: nokogiri
还有a2z:
ERROR: Could not find a valid gem 'a2z' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - Errno::ETIMEDOUT: Operation timed out - connect(2) (https://api.rubygems.org/quick/Marshal.4.8/a2z-0.1.3.gemspec.rz)
如果任何人以前曾遇到过此问题并可以帮助我,将不胜感激.
If anyone has experience this issue before and can help me out it would be greatly appreciated.
如果有帮助,我正在运行 MacOS Mavericks ,并具有 gem版本2.2.2 .
If it helps, I'm running MacOS Mavericks and have gem version 2.2.2.
推荐答案
在您的Gemfile中设置
In your Gemfile set your
源'http://production.s3.rubygems.org'
这可能不是官方的答案,但是在尝试访问rubygems.org的三天令人沮丧之后,它对我有用.
This may not be an official answer, but it worked for me after three frustrating days trying to access rubygems.org.
这篇关于安装红宝石宝石时超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!