resque / resque-web

a Rails-based web interface to Resque
235 stars 166 forks source link

undefined method 'poll' #76

Closed flynfish closed 8 years ago

flynfish commented 9 years ago

I get this error very frequently just going to localhost:3000/resque and I have to restart the app. Once it is restarted, that webpage works again.

Showing /usr/local/rvm/gems/ruby-2.1.2@cfs-web/gems/resque-web-0.0.6/app/views/resque_web/overview/show.html.erb where line #4 raised:

undefined method `poll' for #<#<Class:0x000000077cf6d0>:0x000000077ce208>
Extracted source (around line #4):

1: <%= render 'resque_web/queues/queues' %>
2: <hr>
3: <%= render 'resque_web/working/working' %>
4: <%= poll(polling) %>
ugacode commented 9 years ago

I've also come across this issue with the following setup: Rails 4.2.0, Puma 2.8.2, Resque 1.25.0

jdatti commented 9 years ago

This happened while we mounted resque-web in our application.

Its happening because all the controllers in resque-web are extending 'ApplicationController' instead of 'ResqueWeb::ApplicationController'.

Because of this, helpers are not being included and thats causing this issue.

mvlwn commented 9 years ago

I "fixed" this by putting ResqueWeb::Engine.eager_load! in my routes.rb.

bucchere commented 9 years ago

@mvlwn +1 for the eager_load! work around; I can vouch for it working locally and in heroku.

seanlinsley commented 9 years ago

eager_load! also worked for me

azelenets commented 9 years ago

@mvlwn +1

Coren commented 9 years ago

Thanks @mvlwn !

hakunin commented 9 years ago

Same here, will this get fixed or at least worked around if its Rails specific?

rarruda commented 8 years ago

@hakunin : this is fixed in this PR: https://github.com/resque/resque-web/pull/79 (by @jdatti ) and a work around is to put ResqueWeb::Engine.eager_load! into your routes.rb ( as mentioned by @mvlwn )

Once there is a new version of the Gem released, then the fix should come with it!

mcfiredrill commented 8 years ago

I released a new version of the Gem, which I believe should fix this issue. Please upgrade and feel free to reopen this issue if its still a problem.