我使用private_pub將通知推送給訂閱客戶端給我的用戶。在我的application.html.haml中我有:如何在生產中訪問此輔助函數?
...
= javascript_include_tag 'application'
= subscribe_to "/#{@user.access_token}/notifications"
...
subscribe_to helper在開發中工作正常。當部署到生產,記錄了以下錯誤:
ActionView::Template::Error (undefined method `subscribe_to' for #<#<Class:0x00000001f372e8>:0x00000001fded90>):
5: = stylesheet_link_tag 'application', :media => 'all'
6: = include_gon(:init => true)
7: = javascript_include_tag 'application'
8: = subscribe_to "/#{@user.access_token}/notifications"
9: = csrf_meta_tags
10:
11: %body
app/views/layouts/application.html.haml:8:in `_app_views_layouts_application_html_haml__1867651381877570337_14592040'
我怎樣才能得到我的生產環境中訪問這個helper方法?
的確在生產你'束install'將它添加到的Gemfile後? – 2012-07-31 17:54:19
是的,我的部署腳本運行捆綁軟件安裝 – 2012-07-31 18:26:25
您運行的Rails版本是什麼? – 2012-07-31 18:49:20