捆绑安装无法从https://rubygems.org/获取规格 [英] Bundle Install could not fetch specs from https://rubygems.org/

查看:63
本文介绍了捆绑安装无法从https://rubygems.org/获取规格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试遵循Hartl Rails教程,并且对捆绑程序gem有麻烦。

I'm attempting to follow the Hartl Rails Tutorial, and having trouble with the bundler gem.

使用命令 bundle install或 bundle update时我得到以下输出:

When using the commands 'bundle install' or 'bundle update' I get the following output:


https:/ /rubygems.org/

无法从 https:// ruby​​gems获取规范。 org /

我已经搜索了此输出,但是没有在网上找到许多相关问题。

I've searched for this output, but did not find many related issues online.

也许我还有另一个打捆机的宝石?在这一点上,我对Rails的了解很少。

Maybe I have another gem that is interrupting bundler? I have little experience with rails at this point.

    source 'https://rubygems.org'

gem 'rails', '3.2.12'

group :development do
  gem 'sqlite3', '1.3.5'
end


# Gems used only for assets and not required
# in production environments by default.
group :assets do
  gem 'sass-rails',   '3.2.5'
  gem 'coffee-rails', '3.2.2'

  gem 'uglifier', '1.2.3'
end

gem 'jquery-rails', '2.0.2'

对我来说,解决方案包括两个部分:我将https更改为http,这暂时解决了该问题。第二个问题是,即使我使用的是全新的ruby 1.9.3,我也认为我的ruby 2.0.0安装不好。因此,我重新安装了ruby 2.0.0,可以将捆绑安装与https一起使用。

The solution for me was two parts: I changed https to http, and that temporarily solved the issue. The second issue was that I think I had a bad install of ruby 2.0.0 even though I was using a fresh install of ruby 1.9.3. So I reinstalled ruby 2.0.0, and I could use bundle install with https.

推荐答案

以防万一以上都不满足下一个无畏的探索者,我以为我在这里花了4个小时进行了搜索的各种变体之后才发现我,在找到关于help.rubygems.org的特定线程。解?此(Fedora,Linux):

Just in case none of the above satisfies the next intrepid explorer, I thought I'd drop here that after I spent 4 hours on this doing variants of the search that landed me here, I finally discovering that IPV6 was the culprit, after finding this specific thread on help.rubygems.org. Solution? this (Fedora, Linux):

sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1

设置一个shell脚本来打开和关闭IPV6,这样我就可以在没有命令的情况下运行命令,现在一切都变了。

set up a shell script to flip IPV6 on and off so I could run a command without it, and now everything runs peachy.

这篇关于捆绑安装无法从https://rubygems.org/获取规格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆