2014-09-08 4 views
1

Ruby 2.1, Rails 4.1.4가 방금 Resque 2.0의 마스터 브랜치를 통합했습니다. 웹 인터페이스 인 Resque-web을위한 새로운 보석이 있습니다.Resque-web 인터페이스가 작동하지 않습니다.

내가 웹 인터페이스에 갈 때

불행하게도, 나는이 오류 얻을 : 이미 레디 스를 설치 한 gem 'resque-web', require: 'resque_web'

와 레디 스 서버 실행이 내 Gemfile에

undefined method `workers' for Resque:Module 
Extracted source (around line #1): 
    <h1 class="wi"><%= worker_jobs.size %> of <%= workers.size %> Workers Working</h1> 
    <p class="intro">The list below contains all workers which are currently running a job.</p> 
    <table class="table table-bordered workers"> 
     <tr> 

을, 내가 할 . 내 routes.rb, 나는

require 'resque_web' 내 실제 경로에, 나는 나 또한 근로자를 실행 시도 mount ResqueWeb::Engine => "/resque_web"

을하지만, 나도이 고정 일을 생각하지 않습니다.

여기에 스택 트레이스는 다음과 같습니다

resque-web (0.0.6) app/helpers/resque_web/working_helper.rb:4:in `workers' 
resque-web (0.0.6) app/helpers/resque_web/working_helper.rb:12:in `worker_jobs' 
resque-web (0.0.6) app/views/resque_web/working/_working.html.erb:1:in `___sers__avid__rbenv_versions_______lib_ruby_gems_______gems_resque_web_______app_views_resque_web_working__working_html_erb___4177816445361536411_70337550467320' 
actionview (4.1.4) lib/action_view/template.rb:145:in `block in render' 
activesupport (4.1.4) lib/active_support/notifications.rb:159:in `block in instrument' 
activesupport (4.1.4) lib/active_support/notifications/instrumenter.rb:20:in `instrument' 
activesupport (4.1.4) lib/active_support/notifications.rb:159:in `instrument' 
actionview (4.1.4) lib/action_view/template.rb:339:in `instrument' 
actionview (4.1.4) lib/action_view/template.rb:143:in `render' 
actionview (4.1.4) lib/action_view/renderer/partial_renderer.rb:306:in `render_partial' 
actionview (4.1.4) lib/action_view/renderer/partial_renderer.rb:279:in `block in render' 
actionview (4.1.4) lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument' 
activesupport (4.1.4) lib/active_support/notifications.rb:159:in `block in instrument' 
activesupport (4.1.4) lib/active_support/notifications/instrumenter.rb:20:in `instrument' 
activesupport (4.1.4) lib/active_support/notifications.rb:159:in `instrument' 
actionview (4.1.4) lib/action_view/renderer/abstract_renderer.rb:38:in `instrument' 
actionview (4.1.4) lib/action_view/renderer/partial_renderer.rb:278:in `render' 
actionview (4.1.4) lib/action_view/renderer/renderer.rb:47:in `render_partial' 
actionview (4.1.4) lib/action_view/helpers/rendering_helper.rb:35:in `render' 
haml (4.0.5) lib/haml/helpers/action_view_mods.rb:12:in `render_with_haml' 
resque-web (0.0.6) app/views/resque_web/overview/show.html.erb:3:in `___sers__avid__rbenv_versions_______lib_ruby_gems_______gems_resque_web_______app_views_resque_web_overview_show_html_erb__2964728264206778935_70337550244520' 
actionview (4.1.4) lib/action_view/template.rb:145:in `block in render' 
activesupport (4.1.4) lib/active_support/notifications.rb:159:in `block in instrument' 
activesupport (4.1.4) lib/active_support/notifications/instrumenter.rb:20:in `instrument' 
activesupport (4.1.4) lib/active_support/notifications.rb:159:in `instrument' 
actionview (4.1.4) lib/action_view/template.rb:339:in `instrument' 
actionview (4.1.4) lib/action_view/template.rb:143:in `render' 
actionview (4.1.4) lib/action_view/renderer/template_renderer.rb:55:in `block (2 levels) in render_template' 
actionview (4.1.4) lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument' 
activesupport (4.1.4) lib/active_support/notifications.rb:159:in `block in instrument' 
activesupport (4.1.4) lib/active_support/notifications/instrumenter.rb:20:in `instrument' 
activesupport (4.1.4) lib/active_support/notifications.rb:159:in `instrument' 
actionview (4.1.4) lib/action_view/renderer/abstract_renderer.rb:38:in `instrument' 
actionview (4.1.4) lib/action_view/renderer/template_renderer.rb:54:in `block in render_template' 
actionview (4.1.4) lib/action_view/renderer/template_renderer.rb:62:in `render_with_layout' 
actionview (4.1.4) lib/action_view/renderer/template_renderer.rb:53:in `render_template' 
actionview (4.1.4) lib/action_view/renderer/template_renderer.rb:17:in `render' 
actionview (4.1.4) lib/action_view/renderer/renderer.rb:42:in `render_template' 
actionview (4.1.4) lib/action_view/renderer/renderer.rb:23:in `render' 
actionview (4.1.4) lib/action_view/rendering.rb:99:in `_render_template' 
actionpack (4.1.4) lib/action_controller/metal/streaming.rb:217:in `_render_template' 
actionview (4.1.4) lib/action_view/rendering.rb:82:in `render_to_body' 
actionpack (4.1.4) lib/action_controller/metal/rendering.rb:32:in `render_to_body' 
actionpack (4.1.4) lib/action_controller/metal/renderers.rb:32:in `render_to_body' 
actionpack (4.1.4) lib/abstract_controller/rendering.rb:25:in `render' 
actionpack (4.1.4) lib/action_controller/metal/rendering.rb:16:in `render' 
actionpack (4.1.4) lib/action_controller/metal/instrumentation.rb:41:in `block (2 levels) in render' 
activesupport (4.1.4) lib/active_support/core_ext/benchmark.rb:12:in `block in ms' 
/Users/David/.rbenv/versions/2.1.2/lib/ruby/2.1.0/benchmark.rb:294:in `realtime' 
activesupport (4.1.4) lib/active_support/core_ext/benchmark.rb:12:in `ms' 
actionpack (4.1.4) lib/action_controller/metal/instrumentation.rb:41:in `block in render' 
actionpack (4.1.4) lib/action_controller/metal/instrumentation.rb:84:in `cleanup_view_runtime' 
activerecord (4.1.4) lib/active_record/railties/controller_runtime.rb:25:in `cleanup_view_runtime' 
actionpack (4.1.4) lib/action_controller/metal/instrumentation.rb:40:in `render' 
resque-web (0.0.6) app/controllers/resque_web/overview_controller.rb:4:in `show' 
actionpack (4.1.4) lib/action_controller/metal/implicit_render.rb:4:in `send_action' 
actionpack (4.1.4) lib/abstract_controller/base.rb:189:in `process_action' 
actionpack (4.1.4) lib/action_controller/metal/rendering.rb:10:in `process_action' 
actionpack (4.1.4) lib/abstract_controller/callbacks.rb:20:in `block in process_action' 
activesupport (4.1.4) lib/active_support/callbacks.rb:113:in `call' 
activesupport (4.1.4) lib/active_support/callbacks.rb:113:in `call' 
activesupport (4.1.4) lib/active_support/callbacks.rb:166:in `block in halting' 
activesupport (4.1.4) lib/active_support/callbacks.rb:166:in `call' 
activesupport (4.1.4) lib/active_support/callbacks.rb:166:in `block in halting' 
activesupport (4.1.4) lib/active_support/callbacks.rb:229:in `call' 
activesupport (4.1.4) lib/active_support/callbacks.rb:229:in `block in halting' 
activesupport (4.1.4) lib/active_support/callbacks.rb:229:in `call' 
activesupport (4.1.4) lib/active_support/callbacks.rb:229:in `block in halting' 
activesupport (4.1.4) lib/active_support/callbacks.rb:166:in `call' 
activesupport (4.1.4) lib/active_support/callbacks.rb:166:in `block in halting' 
activesupport (4.1.4) lib/active_support/callbacks.rb:166:in `call' 
activesupport (4.1.4) lib/active_support/callbacks.rb:166:in `block in halting' 
activesupport (4.1.4) lib/active_support/callbacks.rb:166:in `call' 
activesupport (4.1.4) lib/active_support/callbacks.rb:166:in `block in halting' 
activesupport (4.1.4) lib/active_support/callbacks.rb:86:in `call' 
activesupport (4.1.4) lib/active_support/callbacks.rb:86:in `run_callbacks' 
actionpack (4.1.4) lib/abstract_controller/callbacks.rb:19:in `process_action' 
actionpack (4.1.4) lib/action_controller/metal/rescue.rb:29:in `process_action' 
actionpack (4.1.4) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action' 
activesupport (4.1.4) lib/active_support/notifications.rb:159:in `block in instrument' 
activesupport (4.1.4) lib/active_support/notifications/instrumenter.rb:20:in `instrument' 
activesupport (4.1.4) lib/active_support/notifications.rb:159:in `instrument' 
actionpack (4.1.4) lib/action_controller/metal/instrumentation.rb:30:in `process_action' 
actionpack (4.1.4) lib/action_controller/metal/params_wrapper.rb:250:in `process_action' 
activerecord (4.1.4) lib/active_record/railties/controller_runtime.rb:18:in `process_action' 
actionpack (4.1.4) lib/abstract_controller/base.rb:136:in `process' 
actionview (4.1.4) lib/action_view/rendering.rb:30:in `process' 
actionpack (4.1.4) lib/action_controller/metal.rb:196:in `dispatch' 
actionpack (4.1.4) lib/action_controller/metal/rack_delegation.rb:13:in `dispatch' 
actionpack (4.1.4) lib/action_controller/metal.rb:232:in `block in action' 
actionpack (4.1.4) lib/action_dispatch/routing/route_set.rb:82:in `call' 
actionpack (4.1.4) lib/action_dispatch/routing/route_set.rb:82:in `dispatch' 
actionpack (4.1.4) lib/action_dispatch/routing/route_set.rb:50:in `call' 
actionpack (4.1.4) lib/action_dispatch/journey/router.rb:71:in `block in call' 
actionpack (4.1.4) lib/action_dispatch/journey/router.rb:59:in `each' 
actionpack (4.1.4) lib/action_dispatch/journey/router.rb:59:in `call' 
actionpack (4.1.4) lib/action_dispatch/routing/route_set.rb:678:in `call' 
railties (4.1.4) lib/rails/engine.rb:514:in `call' 
railties (4.1.4) lib/rails/railtie.rb:194:in `public_send' 
railties (4.1.4) lib/rails/railtie.rb:194:in `method_missing' 
actionpack (4.1.4) lib/action_dispatch/journey/router.rb:71:in `block in call' 
actionpack (4.1.4) lib/action_dispatch/journey/router.rb:59:in `each' 
actionpack (4.1.4) lib/action_dispatch/journey/router.rb:59:in `call' 
actionpack (4.1.4) lib/action_dispatch/routing/route_set.rb:678:in `call' 
newrelic_rpm (3.8.1.221) lib/new_relic/rack/error_collector.rb:55:in `call' 
newrelic_rpm (3.8.1.221) lib/new_relic/rack/agent_hooks.rb:32:in `call' 
newrelic_rpm (3.8.1.221) lib/new_relic/rack/browser_monitoring.rb:27:in `call' 
newrelic_rpm (3.8.1.221) lib/new_relic/rack/developer_mode.rb:45:in `call' 
warden (1.2.3) lib/warden/manager.rb:35:in `block in call' 
warden (1.2.3) lib/warden/manager.rb:34:in `catch' 
warden (1.2.3) lib/warden/manager.rb:34:in `call' 
rack (1.5.2) lib/rack/etag.rb:23:in `call' 
rack (1.5.2) lib/rack/conditionalget.rb:25:in `call' 
rack (1.5.2) lib/rack/head.rb:11:in `call' 
actionpack (4.1.4) lib/action_dispatch/middleware/params_parser.rb:27:in `call' 
actionpack (4.1.4) lib/action_dispatch/middleware/flash.rb:254:in `call' 
rack (1.5.2) lib/rack/session/abstract/id.rb:225:in `context' 
rack (1.5.2) lib/rack/session/abstract/id.rb:220:in `call' 
actionpack (4.1.4) lib/action_dispatch/middleware/cookies.rb:560:in `call' 
activerecord (4.1.4) lib/active_record/query_cache.rb:36:in `call' 
activerecord (4.1.4) lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in `call' 
activerecord (4.1.4) lib/active_record/migration.rb:380:in `call' 
actionpack (4.1.4) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call' 
activesupport (4.1.4) lib/active_support/callbacks.rb:82:in `run_callbacks' 
actionpack (4.1.4) lib/action_dispatch/middleware/callbacks.rb:27:in `call' 
actionpack (4.1.4) lib/action_dispatch/middleware/reloader.rb:73:in `call' 
actionpack (4.1.4) lib/action_dispatch/middleware/remote_ip.rb:76:in `call' 
actionpack (4.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:17:in `call' 
actionpack (4.1.4) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call' 
railties (4.1.4) lib/rails/rack/logger.rb:38:in `call_app' 
railties (4.1.4) lib/rails/rack/logger.rb:20:in `block in call' 
activesupport (4.1.4) lib/active_support/tagged_logging.rb:68:in `block in tagged' 
activesupport (4.1.4) lib/active_support/tagged_logging.rb:26:in `tagged' 
activesupport (4.1.4) lib/active_support/tagged_logging.rb:68:in `tagged' 
railties (4.1.4) lib/rails/rack/logger.rb:20:in `call' 
actionpack (4.1.4) lib/action_dispatch/middleware/request_id.rb:21:in `call' 
rack (1.5.2) lib/rack/methodoverride.rb:21:in `call' 
rack (1.5.2) lib/rack/runtime.rb:17:in `call' 
activesupport (4.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:26:in `call' 
rack (1.5.2) lib/rack/lock.rb:17:in `call' 
actionpack (4.1.4) lib/action_dispatch/middleware/static.rb:64:in `call' 
rack (1.5.2) lib/rack/sendfile.rb:112:in `call' 
railties (4.1.4) lib/rails/engine.rb:514:in `call' 
railties (4.1.4) lib/rails/application.rb:144:in `call' 
rack (1.5.2) lib/rack/lock.rb:17:in `call' 
rack (1.5.2) lib/rack/content_length.rb:14:in `call' 
rack (1.5.2) lib/rack/handler/webrick.rb:60:in `service' 
/Users/David/.rbenv/versions/2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:138:in `service' 
/Users/David/.rbenv/versions/2.1.2/lib/ruby/2.1.0/webrick/httpserver.rb:94:in `run' 
/Users/David/.rbenv/versions/2.1.2/lib/ruby/2.1.0/webrick/server.rb:295:in `block in start_thread' 

사람이 내가 밖으로 떠날거야 무엇을 어떤 아이디어가 있습니까? 아마도 resque-web과 함께 Resque 2.0을 사용하기에 너무 이르다 ...?

답변

3

resque-web 용 resque-2 브랜치를 사용하여이 문제를 해결할 수 있습니다. 당신은

gem 'resque-web', git: 'https://github.com/resque/resque-web.git', branch: 'resque-2' 

이 그런 다음 레일 응용 프로그램은 당신이 /resque_web을 방문 할 수있을 것 재부팅 한 후

bundle install 

을 설치 번들을 실행하여 Gemfile

에 지점을 설정할 수 있습니다.

resque-2 분기의 resque-web에 대한 README에는 resque-web 및 resque 2.0에 대한 추가 정보가 있습니다.

+0

도움을 주셔서 감사합니다. 빠른 것, 보석 이름은 'resque-web'이 아니라 'resque_web'입니다. 편집을 시도했지만 '편집 내용이 6 자 이상이어야합니다'오류가 발생했습니다. 업데이트 할 수 있습니까? –

+0

지적 해 주셔서 고맙습니다. 이제는 정확해야합니다. –

+0

gem 'resque-web', 'gitub : resque/resque-web', 브랜치 : 'resque-2', require : 'resque_web'를 사용하려면 'resque_web'이 필요했습니다. – twmulloy