EDIT: Forgot to mention that you need Faye's JS in your client, so just add
<%= javascript_include_tag :defaults, "http://localhost:3000/stream.js" %>
to your application.html.erb!
- Start server (and resque-worker) with
rails s thin
(andrake resque-work
). - Go to the index page of your Controller
- Open up a console and either fire up Events manually by calling Resque's perform action directly as
or by queueing the Job and let the worker to the rest asrails c => PushEventJob.perform('my_events', 'hello', 'this is dog'
or by using curl from the command line likerails c => Resque.enqueue(PushEventJob, 'my_events', 'hello', 'this is dog')
curl http://localhost:3000/stream -d 'message={"channel":"/my_channel", \ "data":"{\"title\":\"hello\",\"message\":\"this is dog\"}"}'`