私はすべてを試しましたが、これを修正できなかったので、ここに来ました:)。私はローカルで次の作業を完璧に行っていますが、何らかの理由でherokuにプッシュすると壊れます。
私の application.html.haml テンプレート:
%body
= render :partial => 'layouts/topbar'
- if user_signed_in?
- if current_page?(url_for(:controller => 'posts', :action => 'index'))
= render :partial => "layouts/flash_messages", :locals => {:flash => flash}
= yield
#go-top
Scroll to Top
- else
.container.main
= render :partial => "layouts/flash_messages", :locals => {:flash => flash}
= yield
- else
.container.main
= render :partial => "layouts/flash_messages", :locals => {:flash => flash}
= yield
誰かが私のエラーを指摘できますか? または、これがherokuで壊れている理由を知っていますか? 前もって感謝します。
編集:
私は杉のスタックアプリを使用しており、私のherokuログにはそのパスが存在しますが、
2012-06-14T08:39:59+00:00 app[web.1]: Started GET "/user_root" for XXX.XX.XXX.XX at 2012-06-14 08:39:59 +0000
2012-06-14T08:39:59+00:00 app[web.1]: ActionController::RoutingError (No route matches {:controller=>"posts"}):
2012-06-14T08:39:59+00:00 app[web.1]: app/views/layouts/application.html.haml:27:in `_app_views_layouts_application_html_haml___40461595758832869_62063220'
2012-06-14T08:39:59+00:00 app[web.1]: Processing by HomeController#index as HTML
2012-06-14T08:39:59+00:00 app[web.1]:
2012-06-14T08:39:59+00:00 app[web.1]: Rendered layouts/_topbar.html.haml (3.6ms)
2012-06-14T08:39:59+00:00 app[web.1]:
2012-06-14T08:39:59+00:00 app[web.1]: cache: [GET /user_root] miss
2012-06-14T08:39:59+00:00 app[web.1]: Rendered home/index.html.haml within layouts/application (1.0ms)
2012-06-14T08:39:59+00:00 app[web.1]: Completed 500 Internal Server Error in 15ms