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

相关推荐
EatFan5 小时前
HTML前端利用flex解决input定位的问题
前端·css·html·css3
labixiong9 小时前
告别scroll 监听:CSS 滚动驱动动画,主线程堵死也仍跟手
前端·css·html
曲无忆9 小时前
体脂率计算器HTML实现
html
Arms20614 小时前
https配置备忘
网络协议·http·https
King of fraud15 小时前
HTML 页面的 CSS 选择器详解
前端·css·html
蜡台15 小时前
Vue 3 原生 ESM 开发实战:不用打包工具,从零搭建组件化应用
前端·javascript·vue.js·html
用户2986985301415 小时前
在 React 中使用 JavaScript 将 HTML 转换为图片
javascript·react.js·html
IMPYLH16 小时前
HTML 的 <rp> 元素
前端·javascript·html
乱码三千17 小时前
密码管理工具站正式上线啦
前端·html·github
IMPYLH17 小时前
HTML 的 <rt> 元素
前端·html