2013-04-15 33 views
0

我的Rails应用程序没有加载因某种原因未定义的方法 '捕获' 与Postmarkdown红宝石宝石

index.html.haml where line #4 raised: 
undefined method `captures' for nil:NilClass 

我的配置/路线:

postmarkdown :as => :blog 
root :to => 'posts#index' 

我的职位/ index.html.haml

= render 'feed_link' 

%section#posts 
    - if collection.present? 
    = render collection, :summary => true 
    = paginate collection 
    - else 
    No posts found. 

我使用这种宝石:https://github.com/ennova/postmarkdown

+0

它是集合或@collection? – 2013-04-15 06:38:37

回答

1

似乎app/posts /中的一个或多个文件不符合PostMarkdown所需的文件名格式 。请参阅我们的自述文件中的 示例。

请检查GitHub的项目问题:

https://github.com/ennova/postmarkdown/issues/15

+0

感谢您的回答。尽管我遇到了与heroku相同的问题。 'rails s'和localhost都很好用,但是一旦我部署到heroku就会发生同样的'捕获'错误。即使在'git push heroku master'之后 - 如果您有任何想法,请告诉我!谢谢 –

+0

不知道,你什么时候收到Heroku的错误?我可以看到日志吗? – Abram