我刚刚成功配置了Spree on Rails(在Rails 4.0.2 + Ruby 2.0.0以及Rails 3.2.4 + Ruby 1.9.3上),但现在我正在尝试添加“spree_marketplace”和“spree_drop_ship”狂欢,但收到此错误
Bundler could not find compatible versions for gem "spree_core":
In Gemfile:
spree_marketplace (>= 0) ruby depends on
spree_core (~> 2.0.3) ruby
spree (>= 0) ruby depends on
spree_core (2.2.0.beta)
目前我的Ruby和Rails版本是
$ ruby -v
ruby 2.0.0p353
$ rails -v
Rails 4.0.2
我的Gemfile
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.2'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
gem 'spree', :github => "spree/spree"
gem 'spree_auth_devise', :github => "spree/spree_auth_devise"
gem 'spree_marketplace', github: 'jdutil/spree_marketplace'
gem 'spree_drop_ship', github: 'jdutil/spree_drop_ship'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.2'
group :doc do
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', require: false
end
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.1.2'
# Use unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano', group: :development
# Use debugger
# gem 'debugger', group: [:development, :test]
答案 0 :(得分:2)
@AlexD写道,你受到spree_marketplace
gemspec的限制。你可以做两件事,要么使用某人的叉子(或创建你自己的)有碰撞的gemspec(虽然这样的撞击会破坏某些东西,你必须自己检查并运行规范,如果它们被写入):
gem 'spree', :github => "spree/spree", branch: '2-1-stable'
gem 'spree_auth_devise', :github => "spree/spree_auth_devise", branch: '2-1-stable'
gem 'spree_marketplace', github: 'emcgee/spree_marketplace'
gem 'spree_drop_ship', github: 'jdutil/spree_drop_ship'
或降级为spree_marketplace
允许的最高版本:
gem 'spree', :github => "spree/spree", branch: '2-0-stable'
gem 'spree_auth_devise', :github => "spree/spree_auth_devise", branch: '2-0-stable'
gem 'spree_marketplace', github: 'jdutil/spree_marketplace'
gem 'spree_drop_ship', github: 'jdutil/spree_drop_ship', branch: '2-0-stable'
如果你想使用Rails 4,你应该使用Spree 2.1 AFAIK。
答案 1 :(得分:0)
您需要在Gemfile中指定要使用的Spree版本。您要使用的spree_marketplace
gem适用于2.0系列中的Spree版本,从2.0.3到2.0.7(最后一个版本低于2.1.0)。选择该范围内的版本,并为spree
gem指定该版本。否则Bundler会认为你想使用最新版本的spree
gem。
这样的事情:
gem 'spree', '2.0.7', :github => "spree/spree"
如果您想使用Spree的新2.2.0版本,您必须自己创建spree_marketplace
的更新版本,或让别人去做!