I am creating small chat app with rails, I am using private_pub (built on top of faye) gem by Ryan. I followed all steps as per his screencast , but i can't get it working. I am getting below error
undefined method `publish_to' for #<#<Class:0x007f95964f5398>:0x007f95925e6378>
I am including publish_to in chat.js.coffee.erb
msgJson = (message)->
time = $.now()
<% publish_to "/chats/new" do %>
append_chat_message(time,message)
<% end %>
Both my thin and faye servers are running , i used below command to start he faye
rackup private_pub.ru -s thin -E production
I included subscribe_to line in my template
<%= subscribe_to "/chats/new" %>
and also added assets
//= require private_pub
I don't know , where its going wrong. Any help will be useful.