亲测解决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

相关推荐
LIUAWEIO12 小时前
CSS 让鼠标呈现手型,鼠标悬浮变小手
css·html·css3·html5
ZC跨境爬虫16 小时前
跟着 MDN 学CSS day_51:支持旧浏览器的布局策略
前端·css·html·tensorflow·媒体
DFT计算杂谈20 小时前
VASP 磁性结构可视化:一键生成完美 VESTA / MCIF
java·前端·css·html·css3
开发者联盟league21 小时前
docker登录失败解决方法。http: server gave HTTP response to HTTPS client
http·docker·https
y = xⁿ1 天前
HTTP 和 HTTPS 的区别
网络协议·http·https
a1117761 天前
Aholo Viewer 3DGS渲染器 开源html
前端·html
Js_x1 天前
HTML实现类星露谷小游戏
css·html·css3
Solis程序员1 天前
拿捏登录安全:RS256 + 双令牌,把非法请求拦在 Redis 白名单门外
java·安全·缓存·面试·bootstrap·html
cq林志炫1 天前
fastadmin 如何限制访问public\assets\libs目录下面的所有html文件
html·php·fastadmin
小二·1 天前
HTTPS 证书问题排查(SSL/TLS)实战
网络协议·https·ssl