安装ruby on rails一直报Unable to download data from https://rubygems.org/的解决方案
2014-11-22 09:55
951 查看
如题,在用gem install rails时一直报这个错误,完整的错误信息如下:
ERROR: Could not find a valid gem 'rails' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - Errno::ETIMEDOUT: Connection timed out - connect(2) for "s3.amazonaws.com" port 443 (https://api.rubygems.org/latest_specs.4.8.gz)
后台在Google上找到解决方案:
貌似意思是将https替换成http,再试了一下,果然可以了,但是安装完后别忘了把它设回来:
解决方案参考来源:
http://stackoverflow.com/a/19179835/1227911
------------------------ 更新 ---------------------------
虽然用了以上的方法,但是还是时不时的抽风,这要归功于天朝的网络了,现在还有另外的一个方案,就是使用国内淘宝网提供的RubyGems镜像作为源:
sudo gem sources -r https://rubygems.org/
sudo gem sources -a http://ruby.taobao.org/
这下速度就刷刷的了
ERROR: Could not find a valid gem 'rails' (>= 0), here is why:
Unable to download data from https://rubygems.org/ - Errno::ETIMEDOUT: Connection timed out - connect(2) for "s3.amazonaws.com" port 443 (https://api.rubygems.org/latest_specs.4.8.gz)
后台在Google上找到解决方案:
sudo gem sources -r https://rubygems.org sudo gem sources -a http://rubygems.org
貌似意思是将https替换成http,再试了一下,果然可以了,但是安装完后别忘了把它设回来:
sudo gem sources -r http://rubygems.org sudo gem sources -a https://rubygems.org
解决方案参考来源:
http://stackoverflow.com/a/19179835/1227911
------------------------ 更新 ---------------------------
虽然用了以上的方法,但是还是时不时的抽风,这要归功于天朝的网络了,现在还有另外的一个方案,就是使用国内淘宝网提供的RubyGems镜像作为源:
sudo gem sources -r https://rubygems.org/
sudo gem sources -a http://ruby.taobao.org/
这下速度就刷刷的了
相关文章推荐
- ios安装ruby on rails一直报Unable to download data from https://rubygems.org/的解决方案
- 安装ruby on rails错误:Unable to download data from https://rubygems.org/的解决方法
- gem install Unable to download data from https://rubygems.org/
- Fetching gem metadata from https://rubygems.org/..解决方案
- sudo gem install: Unable to download data from http://ruby.taobao.org/ - bad response Not Found 404
- Unable to download data from http:// ruby.taobao.org/ - bad response Not Found 404..
- Ruby on Rails安装过程中出现"no such file to load -- mkmf"错误的解决方法。
- ruby connect to mssql from rails on windows
- Ruby on Rails,环境安装和Gems(转载)
- Could not fetch specs from https://rubygems.org/
- Windows下安装RabbitMQ报错:unable to perform an operation on node时的解决方案
- How to fix: Recieve error "Unable to display this Web Part" on Data Views after restoring site from backup
- Unable to acquire account data from realm [com.hongao.shiro.chapterOne.MyRealm2@2b80d80f]. The [org
- Beginning Ruby on Rails E-Commerce: From Novice to Professional (Rails)
- Ruby on Rails,环境安装和Gems
- iOS ERROR: unable to get the receiver data from the DB 解决方案
- win10 windows10 react-native rn 环境安装配置Unable to load script from assets 'index.android.bundle终极解决方案
- eclipse中 Unable to read repository at http://download.eclipse.org/releases/indigo 解决方案
- Apress.Beginning.Ruby.on.Rails.E.Commerce.From.Novice.to.Professional
- Beginning Ruby on Rails E-Commerce: From Novice to Professional