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

相关推荐
HtwHUAT4 小时前
五、web自动化测试01
前端·css·chrome·python·功能测试·selenium·html
2401_837088507 小时前
HTML给图片居中
前端·javascript·html
工呈士8 小时前
HTML响应式网页设计与跨平台适配
前端·html
前端大白话8 小时前
前端必知!HTML中`<a>`标签target属性全攻略:新窗口、当前窗口、指定框架一网打尽
前端·架构·html
Python私教9 小时前
CentOS 7 基于 Nginx 的 HTML 部署全流程指南
nginx·centos·html
杨超越luckly9 小时前
HTML应用指南:利用GET请求获取微博签到位置信息
大数据·信息可视化·数据分析·html·html5
PythonPioneer9 小时前
每日Html 4.24
前端·html
洛克希德马丁9 小时前
关于Qt对Html/CSS的支持
css·qt·html
我有一棵树9 小时前
元素滚动和内容垂直居中同时存在,完美的 html 元素垂直居中的方法flex + margin: auto
前端·html
2401_837088501 天前
CSS外边距合并现象
前端·css·html