前言

今天在折腾vagrant的时候,发现当我安装vagrant时,需要一些ruby插件。

如果我们没有设置正确的源,就会报time out的错误。

ERROR: While executing gem ... (Gem::RemoteFetcher::UnknownHostError)
    timed out (https://api.rubygems.org/latest_specs.4.8.gz)

 

解决

可以使用国内源。

gem sources --remove https://rubygems.org/
gem sources -a https://gems.ruby-china.com/

就可以了。

 

鸣谢

ruby gems中文官网

Ruby Gem Timeout【超时】问题的解决_Joel__Li的博客-CSDN博客

posted on 2022-07-23 03:06  eryoung2  阅读(1037)  评论(0编辑  收藏  举报