无法安装Spree

时间:2016-11-11 10:16:54

标签: ruby-on-rails bundle spree

尝试在Ubuntu上安装Spree,但我是Linux系统的新手。以下是错误消息:

-desktop ~/mystore $ bundle install
Fetching gem metadata from https://rubygems.org/............
Fetching version metadata from https://rubygems.org/..
Fetching dependency metadata from https://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "spree_core":
  In Gemfile:
    spree (~> 3.1.1) was resolved to 3.1.1, which depends on
      spree_core (= 3.1.1)
    spree (~> 3.1.1) was resolved to 3.1.1, which depends on
      spree_core (= 3.1.1)
    spree (~> 3.1.1) was resolved to 3.1.1, which depends on
      spree_core (= 3.1.1)
    spree (~> 3.1.1) was resolved to 3.1.1, which depends on
      spree_core (= 3.1.1)
    spree (~> 3.1.1) was resolved to 3.1.1, which depends on
      spree_core (= 3.1.1)
    spree_gateway (~> 3.0.0) was resolved to 3.0.0, which depends on
      spree_core (~> 3.0.0)

安装了所有这些宝石,下面是列表:

 rails (5.0.0.1, 4.2.7.1, 4.2.6, 4.2.5)
    rails-deprecated_sanitizer (1.0.3)
    rails-dom-testing (2.0.1, 1.0.7)
    rails-html-sanitizer (1.0.3)
    railties (5.0.0.1, 4.2.7.1, 4.2.6, 4.2.5)
    rake (11.3.0, 10.4.2)
    ransack (1.4.1)
    rb-fsevent (0.9.8)
    rb-inotify (0.9.7)
    rdoc (4.3.0, 4.2.1)
    responders (2.3.0)
    sass (3.4.22)
    sass-rails (5.0.6)
    sdoc (0.4.2)
    select2-rails (3.5.9.1)
    sixarm_ruby_unaccent (1.1.1)
    spree (3.1.1, 3.0.0)
    spree_api (3.1.1, 3.0.0)
    spree_auth_devise (3.1.0)
    spree_backend (3.1.1, 3.0.0)
    spree_cmd (3.1.1, 3.0.0)
    spree_core (3.1.1, 3.0.0)
    spree_frontend (3.1.1, 3.0.0)
    spree_gateway (3.1.0, 3.0.0)
    spree_sample (3.1.1, 3.0.0)

我尝试安装不同版本的rails,Spree,但总是出现同样的错误。 你能帮忙吗?

4 个答案:

答案 0 :(得分:1)

您正尝试使用〜>安装spree 3.1.1和spree_gateway'〜> 3.0.0' 。

这可能是一个依赖性问题

替代选项是

 gem 'spree'
 gem 'spree_gateway'

放置gem而不指定版本

执行:

 bundle install

答案 1 :(得分:0)

您正尝试使用~> 3.1.1和spree_gateway '~> 3.0.0'安装狂欢。您必须更改Gemfile spree_gateway版本。 试试

gem 'spree', '~> 3.1.1'
gem 'spree_gateway', '~> 3.1.0'

答案 2 :(得分:0)

所以我拒绝了你的所有建议 - 从gemfile中删除了版本,删除了除v3.0.0之外的所有狂欢*,只有auth_devise是v3.1.0。版本的auth_devise 3.0.0并不存在于我安装的spree v3.1.0的存储库中,因为所有的gem都是相同的版本。 Stil没有工作A,下面是结果:

Bundler could not find compatible versions for gem "spree_core":
  In Gemfile:
    spree (~> 3.0.0) was resolved to 3.0.0, which depends on
      spree_core (= 3.0.0)

    spree (~> 3.0.0) was resolved to 3.0.0, which depends on
      spree_core (= 3.0.0)

    spree (~> 3.0.0) was resolved to 3.0.0, which depends on
      spree_core (= 3.0.0)

    spree (~> 3.0.0) was resolved to 3.0.0, which depends on
      spree_core (= 3.0.0)

    spree (~> 3.0.0) was resolved to 3.0.0, which depends on
      spree_core (= 3.0.0)

    spree_gateway (~> 3.1.0) was resolved to 3.1.0, which depends on
      spree_core (~> 3.1.0.beta)

捆绑更新将此返回给我:

Bundler could not find compatible versions for gem "rails":
  In Gemfile:
    rails (>= 5.0.0.1, ~> 5.0.0)

    spree (~> 3.1.0) was resolved to 3.1.0, which depends on
      spree_core (= 3.1.0) was resolved to 3.1.0, which depends on
       rails (~> 4.2.6)

答案 3 :(得分:0)

现在spree不适用于rails 5.0,所以如果你想使用它,你必须选择rails 4.2.6(至少)

要使用旧版本的rails创建项目,只需输入:rails 4.2.6 new MyAppName

你可以尝试这个如果工作那么就好了,否则使用旧版本,如下面的狂欢自述文件:

gem 'spree', github: 'spree/spree'

gem 'spree_auth_devise', github: 'spree/spree_auth_devise'

gem 'spree_gateway', github: 'spree/spree_gateway'