2013-12-18 50 views
1

我剛剛成功配置了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無法找到適用於gem spree_core的兼容版本(Spree Ruby on Rails)

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] 

回答

2

您受限於spree_marketplace gemspec爲@AlexD寫道。你可以做兩兩件事,要麼碰到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' 

或者如果你想用Rails 4,你應該使用施普雷2.1 AFAIK

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' 

:降級至spree_marketplace允許的最高版本。

+0

感謝您的建議。這已經完成了我的工作。我降級我的寶石,並使用紅寶石1.9.3和軌道3.2.16。 – Sheraz

0

您需要指定您想要在您的Gemfile中使用的Spree版本。您要使用的spree_marketplace寶石適用於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_marketplace自己,或者讓別人去做!

+0

謝謝亞歷克斯。但問題仍然沒有解決。我曾嘗試過Spree 1.3.0和Spree 2.0.0版本,但錯誤尚未解決。任何其他建議將不勝感激。 – Sheraz

相關問題