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

相关推荐
程序员mine8 小时前
HTTPS-TLS加密与证书完全指南(中)
网络协议·https·ssl
Metaphor6928 小时前
使用 Python 将 PDF 转换为 HTML
python·pdf·html
a11177611 小时前
“黑夜流星“个人引导页 网页html
java·前端·html
程序员mine11 小时前
HTTPS-TLS加密与证书完全指南(上)
网络协议·https
JieE21212 小时前
手把手带你用纯 CSS 实现一个 3D 旋转魔方,这些前端基础你能打几分?
前端·css·html
程序员mine13 小时前
HTTPS-TLS加密与证书完全指南(下)
网络协议·http·https
Cc_Debugger13 小时前
开发环境使用https配置
javascript·vue.js·https
YHL14 小时前
🧊 CSS 3D 硬核解析:四个属性手写旋转立方体
前端·css·html
风吹夏回14 小时前
RabbitMQ 三种模式入门:HelloWorld、WorkQueue、PubSub
分布式·rabbitmq·ruby
a11177614 小时前
无限森林漫游(简约几何版 html
前端·html