【问题标题】:Unable to install spree gem using bundle install无法使用 bundle install 安装 spree gem
【发布时间】:2016-03-15 21:26:09
【问题描述】:

我正在尝试安装spree 及其扩展spree_static_content。我想要spree 3.1.0 beta,因为那是spree_static_content 的依赖项。但是当我尝试运行捆绑安装时,我得到了

Fetching git://github.com/spree/spree.git

但它卡在那里。这是我的宝石文件

gem 'spree', github: 'spree/spree', branch: '~> 3.1.0.beta'
gem 'spree_gateway', github: 'spree/spree_gateway', branch: '~> 3.1.0.beta'
gem 'spree_auth_devise', github: 'spree/spree_auth_devise', branch: '~> 3.1.0.beta'
gem 'spree_static_content', github: 'spree-contrib/spree_static_content', branch: 'master'

我可以通过仅提及版本来安装其他版本的 spree, 例如。 gem 'spree' , '~> 3.0.7' 捆绑安装运行成功。谁能告诉我为什么捆绑安装不起作用。我尝试更新 bundler ,没有帮助。

在尝试时,我了解到由于某种原因从 github 获取 spree 不起作用,但从 github 获取其他 gem 可以工作

【问题讨论】:

  • 从 GitHub 安装 anything 有效吗?也许您的git 连接是防火墙。试过https
  • 没有防火墙阻止,但是你是怎么做到的`https`。我尝试了`git config --global url。"github.com".insteadOfgit://github.com`但它没有将`git://github.com/spree/spree.git`更改为https。
  • 你在其他电脑上试过了吗?它对您不起作用似乎很奇怪,但您需要尝试系统地隔离问题。
  • 我在那里无论如何我可以对此做一些调试?

标签: ruby-on-rails rubygems spree


【解决方案1】:

请检查您在 Gemfile 中提到的分支是否可用。

我相信分支 3.1.0 在 github 的 spree repo 中仍然不可用。

当前和稳定的分支是'3-0-stable'。

【讨论】:

【解决方案2】:

当您使用gitgithub 安装gem 时,您必须确保您所指的tagbranchref 存在(捆绑程序只会签出从存储库中指定的标签/分支/引用)。查看可用的分支here 并选择要安装的内容:

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-08-25
    • 1970-01-01
    • 2018-11-30
    • 1970-01-01
    • 2020-04-11
    • 1970-01-01
    • 1970-01-01
    • 2012-02-17
    相关资源
    最近更新 更多