tristandunn / pusher-fake

A fake Pusher server for development and testing.
https://rubygems.org/gems/pusher-fake
MIT License
173 stars 32 forks source link

500 error from pusher server #12

Closed kbaum closed 11 years ago

kbaum commented 11 years ago

I added this to an initializer:

https://gist.github.com/4348979

And things started up ok, but i get a 500 error when i try to publish and the i am not sure how to debug this:

Pusher::Error (Unknown error (status code 500): Internal server error):
  app/background_jobs/jobs/dashboard_query_job.rb:12:in `perform'
  app/background_jobs/jobs/dashboard_queries_job.rb:19:in `block in perform'
  app/background_jobs/jobs/dashboard_queries_job.rb:10:in `each'
  app/background_jobs/jobs/dashboard_queries_job.rb:10:in `perform'
  app/controllers/building_traffic_controller.rb:11:in `block (2 levels) in show'
  app/controllers/building_traffic_controller.rb:7:in `show'
  app/controllers/application_controller.rb:69:in `set_time_zone'

The code within dashboard_query_job is doing:

https://gist.github.com/4348998

thx!

kbaum commented 11 years ago

Oh.. i am on pusher-0.10.0.

tristandunn commented 11 years ago

I'm fairly certain this is from pusher-fake no longer supporting the old events API. See fbc64238d1bcb40ceb83a6d4fb7efb32b757720c for the changes in pusher-gem.

An immediate solution for you would be to either upgrade pusher-gem to the latest version, or use 0.1.4 of pusher-fake.

Long term it might make sense to make the pusher-gem development dependency a real dependency. I welcome any comments on that potential change, but it seems reasonable and would help avoid upgrading to a version that isn't supported by the pusher-gem version being used.

kbaum commented 11 years ago

I upgraded to the latest pusher gem and it worked! I am very impressed with this. So easy... Thx!