亲测解决Bundler HTTPError Could not fetch specs from

这个问题源于ruby的网站连接不上,解决方法是修改网页地址或者网络配置。

环境

win11 + ruby

问题原文

c 复制代码
Retrying fetcher due to error (2/4): Bundler::HTTPError Could not fetch specs from 
https://rubygems.org/ due to underlying error <IO::TimeoutError: Failed to open TCP connection to rubygems.org:443 (Blocking operation timed out!) (https://rubygems.org/specs.4.8.gz)>

解决方法

方法一

打开Gemfile,将https改成http,Open the Gemfile and change first line from this:

c 复制代码
source 'https://www.rubygems.org'

to this

python 复制代码
source 'http://www.rubygems.org'

remove the 's' from 'https'.

方法二

一般方法一就可以解决了,如果不行尝试换一个网络:比如手机wifi。

Change it to another network (mobile hotspot)

方法三

关闭ipv6的配置。

参考

https://stackoverflow.com/a/47392700/15329637

https://stackoverflow.com/questions/51201517/ruby-cant-connect-to-rubygems-org

相关推荐
RD_daoyi15 小时前
谷歌改写了76%的标题:超60字符的,95%会被谷歌自己重写
大数据·服务器·开发语言·前端·搜索引擎·html
IMPYLH15 小时前
HTML 的 <map> 元素
前端·html
zhanghaha131415 小时前
HTML系列教程:8_HTML 文本格式化标签
前端·css·html
北冥you鱼18 小时前
HTTPS 推送失败?改用 SSH 一键搞定
网络协议·https·ssh
我命由我123451 天前
UI 设计 7 种排列方式
xml·学习·ui·html·产品运营·产品经理·学习方法
এ慕ོ冬℘゜1 天前
深入理解浏览器全屏 API:从 requestFullscreen 到全屏实战
开发语言·html
CZIDC1 天前
华为服务器TS200-2280 V2 iBMC导入SSL证书后问题案例分析
服务器·https·ssl
鱼很腾apoc1 天前
【Linux】第13期 详解应用层协议HTTP+Cookie/Session+HTTPS
linux·服务器·c++·学习·http·https
csuzhucong2 天前
二十一 - 四十阶魔方
javascript·css·html
IMPYLH2 天前
HTML 的 <main> 元素
前端·html