我使用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