解决gem不能使用的问题




以后经过搜索找到了解决方案:
缘由是ruby 的gem被和谐了,如今淘宝的ruby工程师架设了rubygems的国内镜像。使用方法以下:今天尝试使用gem安装cocoaPod时,gem报错:

ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) Errno::ETIMEDOUT: A connection attempt failed because the connected party di d not properly respond after a period of time, or established connection failed because connected host has failed to respond. - connect(2) for "rubygems.global. ssl.fastly.net" port 443 (https://api.rubygems.org/quick/Marshal.4.8/sass-3.4.13 .gemspec.rz)
$ gem sources --remove https://rubygems.org/ $ gem sources -a https://ruby.taobao.org/ $ gem sources -l
打印以下: *** CURRENT SOURCES *** https://ruby.taobao.org以后就能够使用了!
相关文章
相关标签/搜索