机车 CMS 未定义方法 'count' for nil:nilClass



我正在尝试设置机车CMS并在本地运行,但遇到此错误:

NoMethodError in Locomotive/pages#index
Showing /Users/dennismonsewicz/.rvm/gems/ruby-1.9.3-p125/gems/locomotive_cms-2.0.0.rc4/app/views/locomotive/pages/_page.html.haml where line #4 raised:
undefined method `count' for nil:NilClass
Extracted source (around line #4):
1: - if page.not_found?
2:   %li.sep  
3: 
4: %li{ :id => "item-#{page.id}", :class => "page #{css_for_page(page)}" }
5: 
6:   - children = can?(:manage, page) ? page.children : page.children.find_all { |p| !p.templatized? }
7: 

还有其他人在机车上遇到这个问题吗?

机车宝石:gem 'locomotive_cms', '~> 2.0.0.rc.4', :require => 'locomotive/engine'

我能够获得管理员用户设置,但是当您完成初始设置时,应用程序会将您重定向到/locomotive/pages,然后我收到该错误

在机车的文档中,他们声明在您的 Gem 文件中执行以下操作: gem 'locomotive_cms', '~> 2.0.0.rc4', :require => 'locomotive/engine'

但您实际上必须执行以下操作: gem 'locomotive_cms', :require => 'locomotive/engine', :git => "git://github.com/locomotivecms/engine.git"

相关内容

  • 没有找到相关文章

最新更新