2015-08-08 72 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的匹配分支。