繁体   English   中英

无法安装Spree

[英]Can't install 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)

所有这些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)

我尝试安装不同版本的Rails,Spree,但始终出现相同的错误。 能否请你帮忙?

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

这可能是一个依赖问题

替代选项是

 gem 'spree'
 gem 'spree_gateway'

放置宝石而不指定版本

执行:

 bundle install

您正在尝试使用~> 3.1.1和spree_gateway'〜 '~> 3.0.0'安装spree。 您必须更改您的Gemfile spree_gateway版本。 尝试

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

因此,我拒绝了您的所有建议-从gemfile中删除了版本,删除了除v3.0.0以外的所有spree *,只有auth_devise是v3.1.0。 我在仓库安装了spree v3.1.0的版本库中不存在auth_devise 3.0.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)

目前,狂欢不适用于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'

暂无
暂无

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

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