Spree_static_content gem 无法使用 spree 3。3.x

Spree_static_content gem not working with spree 3.3.x

必须使用与 spree 商务网站其余部分相同的布局来创建静态页面。 Spree_static_content 是我尝试使用的 gem。但是,在捆绑安装时出现以下错误。

Bundler could not find compatible versions for gem "spree_core":
  In snapshot (Gemfile.lock):
    spree_core (= 3.3.1)

  In Gemfile:
    spree (~> 3.3.0) was resolved to 3.3.1, which depends on
      spree_core (= 3.3.1)

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

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

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

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

    spree_gateway (~> 3.3) was resolved to 3.3.0, which depends on
      spree_core (< 4.0, >= 3.1.0)

    spree_gateway (~> 3.3) was resolved to 3.3.0, which depends on
      spree_core (< 4.0, >= 3.1.0)

    spree_static_content was resolved to 3.0.1, which depends on
      spree_core (~> 3.0.0)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

找到这个问题的解决方案是因为 gem globalize with Rails 5. 将以下内容添加到您的 Gemfile:

gem 'globalize', git: 'https://github.com/globalize/globalize'
gem 'activemodel-serializers-xml'

接下来,bundle install您将解决上述问题中的错误。