abuisine / docker-resque-web

6 stars 5 forks source link

Get something error resque #2

Open eva-thientran opened 6 years ago

eva-thientran commented 6 years ago

Hello

I have try pull your image and config database redis, but when I running command below

$ docker run --name resque-web -p 8080:80 -e RAILS_RESQUE_REDIS=xx.xx..xx:6379:0 -d abuisine/resque-web

After that I go to the url http://localhost:8080/resque_web then capture log docker

[08de3f65-266b-460e-804c-5ad187fe7c32] activesupport (5.1.4) lib/active_support/notifications.rb:166:in `instrument'
[08de3f65-266b-460e-804c-5ad187fe7c32] actionpack (5.1.4) lib/action_controller/metal/instrumentation.rb:30:in `process_action'
[08de3f65-266b-460e-804c-5ad187fe7c32] actionpack (5.1.4) lib/action_controller/metal/params_wrapper.rb:252:in `process_action'
[08de3f65-266b-460e-804c-5ad187fe7c32] activerecord (5.1.4) lib/active_record/railties/controller_runtime.rb:22:in `process_action'
[08de3f65-266b-460e-804c-5ad187fe7c32] actionpack (5.1.4) lib/abstract_controller/base.rb:124:in `process'
[08de3f65-266b-460e-804c-5ad187fe7c32] actionview (5.1.4) lib/action_view/rendering.rb:30:in `process'
[08de3f65-266b-460e-804c-5ad187fe7c32] actionpack (5.1.4) lib/action_controller/metal.rb:189:in `dispatch'
[08de3f65-266b-460e-804c-5ad187fe7c32] actionpack (5.1.4) lib/action_controller/metal.rb:253:in `dispatch'
[08de3f65-266b-460e-804c-5ad187fe7c32] actionpack (5.1.4) lib/action_dispatch/routing/route_set.rb:49:in `dispatch'
[08de3f65-266b-460e-804c-5ad187fe7c32] actionpack (5.1.4) lib/action_dispatch/routing/route_set.rb:31:in `serve'
[08de3f65-266b-460e-804c-5ad187fe7c32] actionpack (5.1.4) lib/action_dispatch/journey/router.rb:50:in `block in serve'
[08de3f65-266b-460e-804c-5ad187fe7c32] actionpack (5.1.4) lib/action_dispatch/journey/router.rb:33:in `each'
[08de3f65-266b-460e-804c-5ad187fe7c32] actionpack (5.1.4) lib/action_dispatch/journey/router.rb:33:in `serve'
[08de3f65-266b-460e-804c-5ad187fe7c32] actionpack (5.1.4) lib/action_dispatch/routing/route_set.rb:834:in `call'
[08de3f65-266b-460e-804c-5ad187fe7c32] railties (5.1.4) lib/rails/engine.rb:522:in `call'
[08de3f65-266b-460e-804c-5ad187fe7c32] railties (5.1.4) lib/rails/railtie.rb:185:in `public_send'
[08de3f65-266b-460e-804c-5ad187fe7c32] railties (5.1.4) lib/rails/railtie.rb:185:in `method_missing'
[08de3f65-266b-460e-804c-5ad187fe7c32] actionpack (5.1.4) lib/action_dispatch/routing/mapper.rb:17:in `block in <class:Constraints>'
[08de3f65-266b-460e-804c-5ad187fe7c32] actionpack (5.1.4) lib/action_dispatch/routing/mapper.rb:46:in `serve'
[08de3f65-266b-460e-804c-5ad187fe7c32] actionpack (5.1.4) lib/action_dispatch/journey/router.rb:50:in `block in serve'
[08de3f65-266b-460e-804c-5ad187fe7c32] actionpack (5.1.4) lib/action_dispatch/journey/router.rb:33:in `each'
[08de3f65-266b-460e-804c-5ad187fe7c32] actionpack (5.1.4) lib/action_dispatch/journey/router.rb:33:in `serve'
[08de3f65-266b-460e-804c-5ad187fe7c32] actionpack (5.1.4) lib/action_dispatch/routing/route_set.rb:834:in `call'
[08de3f65-266b-460e-804c-5ad187fe7c32] rack (2.0.3) lib/rack/etag.rb:25:in `call'
[08de3f65-266b-460e-804c-5ad187fe7c32] rack (2.0.3) lib/rack/conditional_get.rb:25:in `call'
[08de3f65-266b-460e-804c-5ad187fe7c32] rack (2.0.3) lib/rack/head.rb:12:in `call'
[08de3f65-266b-460e-804c-5ad187fe7c32] rack (2.0.3) lib/rack/session/abstract/id.rb:232:in `context'
[08de3f65-266b-460e-804c-5ad187fe7c32] rack (2.0.3) lib/rack/session/abstract/id.rb:226:in `call'
[08de3f65-266b-460e-804c-5ad187fe7c32] actionpack (5.1.4) lib/action_dispatch/middleware/cookies.rb:613:in `call'
[08de3f65-266b-460e-804c-5ad187fe7c32] actionpack (5.1.4) lib/action_dispatch/middleware/callbacks.rb:26:in `block in call'
[08de3f65-266b-460e-804c-5ad187fe7c32] activesupport (5.1.4) lib/active_support/callbacks.rb:97:in `run_callbacks'
[08de3f65-266b-460e-804c-5ad187fe7c32] actionpack (5.1.4) lib/action_dispatch/middleware/callbacks.rb:24:in `call'
[08de3f65-266b-460e-804c-5ad187fe7c32] actionpack (5.1.4) lib/action_dispatch/middleware/debug_exceptions.rb:59:in `call'
[08de3f65-266b-460e-804c-5ad187fe7c32] actionpack (5.1.4) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
[08de3f65-266b-460e-804c-5ad187fe7c32] railties (5.1.4) lib/rails/rack/logger.rb:36:in `call_app'
[08de3f65-266b-460e-804c-5ad187fe7c32] railties (5.1.4) lib/rails/rack/logger.rb:24:in `block in call'
[08de3f65-266b-460e-804c-5ad187fe7c32] activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `block in tagged'
[08de3f65-266b-460e-804c-5ad187fe7c32] activesupport (5.1.4) lib/active_support/tagged_logging.rb:26:in `tagged'
[08de3f65-266b-460e-804c-5ad187fe7c32] activesupport (5.1.4) lib/active_support/tagged_logging.rb:69:in `tagged'
[08de3f65-266b-460e-804c-5ad187fe7c32] railties (5.1.4) lib/rails/rack/logger.rb:24:in `call'
[08de3f65-266b-460e-804c-5ad187fe7c32] actionpack (5.1.4) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
[08de3f65-266b-460e-804c-5ad187fe7c32] actionpack (5.1.4) lib/action_dispatch/middleware/request_id.rb:25:in `call'
[08de3f65-266b-460e-804c-5ad187fe7c32] rack (2.0.3) lib/rack/method_override.rb:22:in `call'
[08de3f65-266b-460e-804c-5ad187fe7c32] rack (2.0.3) lib/rack/runtime.rb:22:in `call'
[08de3f65-266b-460e-804c-5ad187fe7c32] activesupport (5.1.4) lib/active_support/cache/strategy/local_cache_middleware.rb:27:in `call'
[08de3f65-266b-460e-804c-5ad187fe7c32] actionpack (5.1.4) lib/action_dispatch/middleware/executor.rb:12:in `call'
[08de3f65-266b-460e-804c-5ad187fe7c32] actionpack (5.1.4) lib/action_dispatch/middleware/static.rb:125:in `call'
[08de3f65-266b-460e-804c-5ad187fe7c32] rack (2.0.3) lib/rack/sendfile.rb:111:in `call'
[08de3f65-266b-460e-804c-5ad187fe7c32] railties (5.1.4) lib/rails/engine.rb:522:in `call'
[08de3f65-266b-460e-804c-5ad187fe7c32] puma (3.10.0) lib/puma/configuration.rb:225:in `call'
[08de3f65-266b-460e-804c-5ad187fe7c32] puma (3.10.0) lib/puma/server.rb:605:in `handle_request'
[08de3f65-266b-460e-804c-5ad187fe7c32] puma (3.10.0) lib/puma/server.rb:437:in `process_client'
[08de3f65-266b-460e-804c-5ad187fe7c32] puma (3.10.0) lib/puma/server.rb:301:in `block in run'
[08de3f65-266b-460e-804c-5ad187fe7c32] puma (3.10.0) lib/puma/thread_pool.rb:120:in `block in spawn_thread'

Any suggestion to fix this?

Thanks

abuisine commented 6 years ago

Mhhm I will have to test as the ruby packages are often broken. Did you use this container before ? I use it in production everyday. ++

sgillespie commented 5 years ago

I believe I'm getting the same thing on latest. I get the same thing if I build the container from master:

resque-web_1      | F, [2018-09-26T17:57:57.931814 #1] FATAL -- : [ce92ec71-98eb-46a7-a236-e380002bccc5]                                                                                      
resque-web_1      | F, [2018-09-26T17:57:57.931903 #1] FATAL -- : [ce92ec71-98eb-46a7-a236-e380002bccc5] ActionView::Template::Error (undefined method `root_path' for #<ActionDispatch::Routin
g::RoutesProxy:0x0000558ef7b4fbf0>):                                                                                                                                                          
resque-web_1      | F, [2018-09-26T17:57:57.932048 #1] FATAL -- : [ce92ec71-98eb-46a7-a236-e380002bccc5]     46:             <%= tab tab_name,path %>                                         
resque-web_1      | [ce92ec71-98eb-46a7-a236-e380002bccc5]     47:           <% end %>                                                                                                        
resque-web_1      | [ce92ec71-98eb-46a7-a236-e380002bccc5]     48:           <% if respond_to?(:main_app) %>                                                                                  
resque-web_1      | [ce92ec71-98eb-46a7-a236-e380002bccc5]     49:             <li><%= link_to "Return to Application", main_app.root_path, :class => "nav navbar-nav" %></li>                
resque-web_1      | [ce92ec71-98eb-46a7-a236-e380002bccc5]     50:           <% end %>                                                                                                        
resque-web_1      | [ce92ec71-98eb-46a7-a236-e380002bccc5]     51:         </ul>                                                                                                              
resque-web_1      | [ce92ec71-98eb-46a7-a236-e380002bccc5]     52:       </div>                                                                                                               
resque-web_1      | F, [2018-09-26T17:57:57.932078 #1] FATAL -- : [ce92ec71-98eb-46a7-a236-e380002bccc5]                                                                                      
resque-web_1      | F, [2018-09-26T17:57:57.932135 #1] FATAL -- : [ce92ec71-98eb-46a7-a236-e380002bccc5] actionpack (5.2.1) lib/action_dispatch/routing/routes_proxy.rb:50:in `method_missing'
resque-web_1      | [ce92ec71-98eb-46a7-a236-e380002bccc5] resque-web (0.0.12) app/views/layouts/resque_web/application.html.erb:49:in `__usr_local_bundle_gems_resque_web________app_views_lay
outs_resque_web_application_html_erb___3269171970464491407_47036273140800'

This does not occur in 2.4.0

sgillespie commented 5 years ago

I see the issue here. resque-web added a link in 0.12.0:

https://github.com/resque/resque-web/commit/27c8b51fcf9366fc01095a1269e30ec7eaf15251#diff-68f3087a70754df1f81139215fd827f8R48

This assumes that there is a root_path defined. The fix was made a while ago:

https://github.com/resque/resque-web/commit/96acb1abf3bf6fb7179e352d7b93cd326159ced0#diff-9e8936f73c0afa770d8da53cd3da8e83

But has not been released yet.

So as I see, there are 2 options:

  1. Use resque-web =0.11.0, or
  2. Add a dummy root and set that as the root
sgillespie commented 5 years ago

On second thought, downgrading resque-web is not ideal since then I wouldn't be able to use a redis password