2015-08-08 70 views
0

如何安裝spree_static_content?我得到以下錯誤。如何安裝spree_static_content?

In Gemfile: 
spree_core (~> 3.0.0) ruby 

spree_core (~> 3.0.0) ruby 

spree_core (~> 3.0) ruby 

spree_static_content (>= 0) ruby depends on 
    spree_core (~> 3.1.0.beta) ruby 

spree_core (= 3.0.1) ruby 

spree_core (= 3.0.1) ruby 

spree_core (= 3.0.1) ruby 

spree_core (= 3.0.1) ruby 
Could not find gem 'spree_core (~> 3.1.0.beta) ruby in any of the sources 

最後它說,我需要做的

bundle update 

我這樣做,但同樣得到同樣的錯誤。

回答

0

錯誤消息告訴你該怎麼做。

錯誤是:

spree_static_content(> = 0)紅寶石取決於spree_core(〜> 3.1.0.beta)紅寶石

這意味着你需要spree_core 3.1.0。 beta或更高版本。

運行bundle update將不會更新超出Gemfile中指定版本的gem。

看起來您可能在您的Gemfile中列出了多次相同的寶石。

嘗試調整您的gemfile只有一個適合版本的spree條目。它可能會是這樣的:

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

注意,spree documentation指示加入大禮包,不spree_core。狂熱寶石將包含正確版本的適當狂歡組件。

請不要更新狂歡通常比簡單更新版本號和運行bundle update更有一點涉及。您可能需要對應用程序進行其他調整以適應新版本。

+0

我可以獲得教程嗎? –

+0

它看起來並不像他們已經發布了一個,可能他們會在3.1正式發佈時。現在你只需要玩弄它。 –

+1

或者您可以使用3-0穩定分支。 – JDutil

2

spree_static_contentmaster分支就像寫這篇文章一樣,引用了Spree的3.1.0.β。任何使用舊版Spree的項目,如3.0穩定版,都不兼容。

要使用這個gem進行3.0穩定的Spree項目,您需要使用spree_static_content的分支,該分支構建爲針對該Spree版本運行。你可以在這裏查看: https://github.com/spree-contrib/spree_static_content/tree/3-0-stable

你的Gemfile應該使用此線,包括創業板:

gem 'spree_static_content', github: 'spree-contrib/spree_static_content', branch: '3-0-stable' 

注意branch:值。對於其他版本的Spree,請找到spree_static_content的匹配分支。