简体   繁体   English

无法安装Spree

[英]Can't install Spree

trying to install Spree on Ubuntu, but I'm new to Linux systems. 试图在Ubuntu上安装Spree,但我是Linux系统的新手。 Below is the error message: 下面是错误消息:

-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)

And all this gems is installed, below is the list: 所有这些gem已安装,下面是列表:

 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)

I tried to install different version of rails, Spree, but always the same error. 我尝试安装不同版本的Rails,Spree,但始终出现相同的错误。 Could you please help? 能否请你帮忙?

You are trying to install spree with ~> 3.1.1 and spree_gateway '~> 3.0.0'. 您正在尝试使用〜> 3.1.1和spree_gateway'〜> 3.0.0'安装spree。

This can be a dependency problem 这可能是一个依赖问题

Alternative option is 替代选项是

 gem 'spree'
 gem 'spree_gateway'

Put gem without specifying version 放置宝石而不指定版本

Execute: 执行:

 bundle install

You are trying to install spree with ~> 3.1.1 and spree_gateway '~> 3.0.0' . 您正在尝试使用~> 3.1.1和spree_gateway'〜 '~> 3.0.0'安装spree。 You have to change in your Gemfile spree_gateway version. 您必须更改您的Gemfile spree_gateway版本。 Try 尝试

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

So I fallowed all your recommendations - removed versions from gemfile, removed all spree* excluding v3.0.0, only auth_devise is v3.1.0. 因此,我拒绝了您的所有建议-从gemfile中删除了版本,删除了除v3.0.0以外的所有spree *,只有auth_devise是v3.1.0。 Version of auth_devise 3.0.0 doesn't exist in repository I installed spree v3.1.0 for all the gem's to be the same version. 我在仓库安装了spree v3.1.0的版本库中不存在auth_devise 3.0.0的版本,所有gem的版本都相同。 Stil doesn't works A, below is the result: 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)

Bundle update returns me this: 捆绑更新向我返回了以下内容:

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)

For now spree is not available for rails 5.0, so if you want to use it, you must go for rails 4.2.6(at least) 目前,狂欢不适用于rails 5.0,因此,如果要使用它,必须使用rails 4.2.6(至少)

To create a project using an older version of rails just type: rails 4.2.6 new MyAppName 要使用旧版本的rails创建项目,只需键入:rails 4.2.6 new MyAppName

You can try this If works then fine otherwise use older version, as follow in the spree's README: 您可以尝试以下方法:如果可以,则可以,否则可以使用旧版本,如狂欢的自述文件中所述:

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

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

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM