2016-11-11 73 views
0

試圖在Ubuntu上安裝Spree,但我是Linux系統的新手。以下是錯誤消息:無法安裝Spree

-desktop ~/mystore $ bundle install 
Fetching gem metadata from https://rubygems.org/............ 
Fetching version metadata from https://rubygems.org/.. 
Fetching dependency metadata from https://rubygems.org/. 
Resolving dependencies... 
Bundler could not find compatible versions for gem "spree_core": 
    In Gemfile: 
    spree (~> 3.1.1) was resolved to 3.1.1, which depends on 
     spree_core (= 3.1.1) 
    spree (~> 3.1.1) was resolved to 3.1.1, which depends on 
     spree_core (= 3.1.1) 
    spree (~> 3.1.1) was resolved to 3.1.1, which depends on 
     spree_core (= 3.1.1) 
    spree (~> 3.1.1) was resolved to 3.1.1, which depends on 
     spree_core (= 3.1.1) 
    spree (~> 3.1.1) was resolved to 3.1.1, which depends on 
     spree_core (= 3.1.1) 
    spree_gateway (~> 3.0.0) was resolved to 3.0.0, which depends on 
     spree_core (~> 3.0.0) 

而這一切的寶石安裝,下面是列表:

rails (5.0.0.1, 4.2.7.1, 4.2.6, 4.2.5) 
    rails-deprecated_sanitizer (1.0.3) 
    rails-dom-testing (2.0.1, 1.0.7) 
    rails-html-sanitizer (1.0.3) 
    railties (5.0.0.1, 4.2.7.1, 4.2.6, 4.2.5) 
    rake (11.3.0, 10.4.2) 
    ransack (1.4.1) 
    rb-fsevent (0.9.8) 
    rb-inotify (0.9.7) 
    rdoc (4.3.0, 4.2.1) 
    responders (2.3.0) 
    sass (3.4.22) 
    sass-rails (5.0.6) 
    sdoc (0.4.2) 
    select2-rails (3.5.9.1) 
    sixarm_ruby_unaccent (1.1.1) 
    spree (3.1.1, 3.0.0) 
    spree_api (3.1.1, 3.0.0) 
    spree_auth_devise (3.1.0) 
    spree_backend (3.1.1, 3.0.0) 
    spree_cmd (3.1.1, 3.0.0) 
    spree_core (3.1.1, 3.0.0) 
    spree_frontend (3.1.1, 3.0.0) 
    spree_gateway (3.1.0, 3.0.0) 
    spree_sample (3.1.1, 3.0.0) 

我試圖安裝不同版本的軌道,狂歡的,但總是相同的錯誤。 你能幫忙嗎?

回答

0

您正在嘗試安裝與~> 3.1.1和spree_gateway '~> 3.0.0'的熱潮。您必須更改您的Gemfile spree_gateway版本。 嘗試

gem 'spree', '~> 3.1.1' 
gem 'spree_gateway', '~> 3.1.0' 
+0

根據您的評論AMD仍然有問題,我的Gemfile變化:spree_auth_devise(〜> 3.0.5)拆分到3.0.5,這取決於 spree_core(〜> 3.0.0) spree_gateway(〜> 3.1.0)已解析爲3.1.0,其取決於 spree_core(〜> 3.1.0.beta)spree_gateway(〜> 3.1.0)已解析爲3.1.0,這取決於 spree_core(〜> 3.1.0.beta) –

+0

然後它完全相同的問題,除了spree_auth_devise而不是spree_gateway。您需要所有庫的相同版本。 – sevenseacat

1

您正在試圖安裝與〜> 3.1.1和spree_gateway '〜> 3.0.0' 大禮包。

這可能是一個依賴性問題

替代選項

gem 'spree' 
gem 'spree_gateway' 

戴上寶石不指定版本

執行:

bundle install 
0

所以我休耕所有的建議 - 刪除來自gemfile的版本,刪除了所有spree *,不包括v3.0.0 ,只有auth_devise是v3.1.0。版本的auth_devise 3.0.0在版本庫中不存在我安裝了spree v3.1.0,所有的gem都是相同的版本。史迪威不工作的,下面是結果:

Bundler could not find compatible versions for gem "spree_core": 
    In Gemfile: 
    spree (~> 3.0.0) was resolved to 3.0.0, which depends on 
     spree_core (= 3.0.0) 

    spree (~> 3.0.0) was resolved to 3.0.0, which depends on 
     spree_core (= 3.0.0) 

    spree (~> 3.0.0) was resolved to 3.0.0, which depends on 
     spree_core (= 3.0.0) 

    spree (~> 3.0.0) was resolved to 3.0.0, which depends on 
     spree_core (= 3.0.0) 

    spree (~> 3.0.0) was resolved to 3.0.0, which depends on 
     spree_core (= 3.0.0) 

    spree_gateway (~> 3.1.0) was resolved to 3.1.0, which depends on 
     spree_core (~> 3.1.0.beta) 

捆綁更新返回我:

Bundler could not find compatible versions for gem "rails": 
    In Gemfile: 
    rails (>= 5.0.0.1, ~> 5.0.0) 

    spree (~> 3.1.0) was resolved to 3.1.0, which depends on 
     spree_core (= 3.1.0) was resolved to 3.1.0, which depends on 
     rails (~> 4.2.6) 
0

現在大禮包不可用於軌道5.0,所以如果你想使用它,你必須去鋼軌4.2.6(至少)

若要使用Rails的舊版本只需鍵入一個項目:軌道4.2.6新MyAppName

你可以試試這個如果工作再細,否則使用舊版本,請按照大禮包自述:

gem 'spree', github: 'spree/spree' 

gem 'spree_auth_devise', github: 'spree/spree_auth_devise' 

gem 'spree_gateway', github: 'spree/spree_gateway'