[英]Bundler could not find compatible versions for gem spree_core (Spree Ruby on Rails)
我刚刚在Rails上成功配置了Spree(在Rails 4.0.2 + Ruby 2.0.0以及Rails 3.2.4 + Ruby 1.9.3上),但是现在我试图在spree中添加“ 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
我的宝石文件
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]
正如@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。
您需要在Gemfile中指定要使用的Spree版本。 想要使用的spree_marketplace
gem适用于2.0系列的Spree版本,从2.0.3到2.0.7(最新版本低于2.1.0)。 选择该范围内的版本,并为spree
宝石指定该版本。 否则,Bundler会认为您要使用spree
版宝石的最新版本。
像这样:
gem 'spree', '2.0.7', :github => "spree/spree"
如果要使用新的2.2.0版本的Spree,则必须自己创建spree_marketplace
的更新版本,或者让其他人来做!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.