简体   繁体   English

Bundler找不到与宝石spree_core兼容的版本(Spree Ruby on Rails)

[英]Bundler could not find compatible versions for gem spree_core (Spree Ruby on Rails)

I just configured Spree on Rails successfully (on Rails 4.0.2 + Ruby 2.0.0 as well as on Rails 3.2.4 + Ruby 1.9.3) but now I am trying to add "spree_marketplace" and "spree_drop_ship" to spree but getting this error 我刚刚在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)

Currently my Ruby and Rails versions are 目前我的Ruby和Rails版本是

$ ruby -v
ruby 2.0.0p353

$ rails -v
Rails 4.0.2

My 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]

You are being limited by spree_marketplace gemspec as @AlexD wrote. 正如@AlexD所写,您受到spree_marketplace gemspec的限制。 You can do two things, either use someone's fork (or create your own) with bumped gemspec (although such bumping can broke something, you must check it by yourself and run specs if they are written): 您可以做两件事,要么用某人的叉子(或创建自己的)碰碰到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'

Or downgrade to maximum version allowed by spree_marketplace : 或降级到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'

If you want to use Rails 4 you should use Spree 2.1 AFAIK. 如果要使用Rails 4,则应使用Spree 2.1 AFAIK。

You need to specify the version of Spree you want to use in your Gemfile. 您需要在Gemfile中指定要使用的Spree版本。 The spree_marketplace gem which you want to use is good for versions of Spree in the 2.0 series, from 2.0.3 up to 2.0.7 (the last version lower than 2.1.0). 想要使用的spree_marketplace gem适用于2.0系列的Spree版本,从2.0.3到2.0.7(最新版本低于2.1.0)。 Pick a version in that range, and specify that for the spree gem. 选择该范围内的版本,并为spree宝石指定该版本。 Otherwise Bundler will think you want to use the most recent version of the spree gem. 否则,Bundler会认为您要使用spree版宝石的最新版本。

Something like this: 像这样:

gem 'spree', '2.0.7', :github => "spree/spree"

If you want to use the new 2.2.0 version of Spree, you'll have to either create an updated version of spree_marketplace yourself, or get someone else to do it! 如果要使用新的2.2.0版本的Spree,则必须自己创建spree_marketplace的更新版本,或者让其他人来做!

暂无
暂无

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

相关问题 找不到与宝石“ spree_core”兼容的版本 - Could not find compatible versions for gem “spree_core” Bundler找不到与宝石“ rails”兼容的版本:大礼包 - Bundler could not find compatible versions for gem “rails”: for spree 找不到宝石'spree_core(〜> 2.0.0.beta)红宝石 - Could not find gem 'spree_core (~> 2.0.0.beta) ruby rails错误Bundler找不到与宝石宝石“ spree_backend”兼容的版本 - rails error Bundler could not find compatible versions for gem gem “spree_backend” Spree Commerce安装错误,Bundler找不到gem“rails”的兼容版本 - Spree Commerce installation error, Bundler could not find compatible versions for gem “rails” 使用BitPay和Spree Commerce时,Bundler找不到与宝石“铁路”兼容的版本 - Bundler could not find compatible versions for gem “railties” when using BitPay and Spree Commerce Ruby 导轨错误:捆绑器找不到 gem“捆绑器”的兼容版本: - Ruby rails error: Bundler could not find compatible versions for gem "bundler": Ruby on Rails:捆绑安装找不到“捆绑器”gem的兼容版本 - Ruby on Rails: Bundle install could not find compatible versions for “bundler” gem Bundler 找不到 gem“ruby”的兼容版本 - Bundler could not find compatible versions for gem "ruby" 捆绑器找不到兼容的捆绑器版本-Ruby On Rails **添加载波Gem ** - Bundler could not find compatible versions of bundler - Ruby On Rails **Adding Carrierwave Gem**
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM