Rails捆绑器没有安装狂欢宝石

时间:2014-07-24 20:15:11

标签: ruby-on-rails gem spree

我正在尝试创建一个使用spree的新rails应用程序。我正在尝试安装spree_fancy gem并被告知要将它附加到我的gemfile中。

这是我的宝石文件:

source 'https://rubygems.org'


gem 'rails', '4.1.4'
gem 'sqlite3'
gem 'sass-rails', '~> 4.0.3'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.0.0'

gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0',          group: :doc

gem 'spring',        group: :development


gem 'spree', '2.3.1'
gem 'spree_gateway', :git => 'https://github.com/spree/spree_gateway.git', :branch => '2-3-stable'
gem 'spree_auth_devise', :git => 'https://github.com/spree/spree_auth_devise.git', :branch => '2-3-stable'

gem 'spree_fancy', :git => 'git://github.com/spree/spree_fancy.git', :branch => '2-1-stable'

但是,在运行bundle install后,我收到以下错误:

Bundler could not find compatible versions for gem "spree_core":
  In Gemfile:
    spree_fancy (>= 0) ruby depends on
      spree_core (~> 2.1.0) ruby

    spree (= 2.3.1) ruby depends on
      spree_core (2.3.1)

我该如何解决这个问题?

更新

正如所建议的,我将spree_fancy分支从2.1更改为2.3,现在我又出现了新的错误

Bundler could not find compatible versions for gem "i18n":
  In snapshot (Gemfile.lock):
    i18n (0.6.11)

  In Gemfile:
    spree (= 2.3.1) ruby depends on
      spree_core (= 2.3.1) ruby depends on
        i18n (= 0.6.9) ruby

1 个答案:

答案 0 :(得分:0)

您使用的是Spree和Spree Fancy的不兼容版本。

尝试更改:

gem 'spree_fancy', :git => 'git://github.com/spree/spree_fancy.git', :branch => '2-1-stable'

gem 'spree_fancy', :git => 'git://github.com/spree/spree_fancy.git', :branch => '2-3-stable'

再次运行bundle install