Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constant SidekiqUniqueJobs::Web::Digests not found #396

Closed
looorent opened this issue May 21, 2019 · 5 comments
Closed

Constant SidekiqUniqueJobs::Web::Digests not found #396

looorent opened this issue May 21, 2019 · 5 comments
Assignees

Comments

@looorent
Copy link

Describe the bug
On Sidekiq Web, accessing the "Unique Digests" ( /unique_digests) page produces an error.

Stacktrace

NameError: uninitialized constant SidekiqUniqueJobs::Web::Digests
/usr/local/bundle/gems/sidekiq-unique-jobs-6.0.13/lib/sidekiq_unique_jobs/web.rb:29:in `block in registered'
/usr/local/bundle/gems/sidekiq-5.2.7/lib/sidekiq/web/application.rb:287:in `instance_exec'
/usr/local/bundle/gems/sidekiq-5.2.7/lib/sidekiq/web/application.rb:287:in `block in call'
/usr/local/bundle/gems/sidekiq-5.2.7/lib/sidekiq/web/application.rb:283:in `catch'
/usr/local/bundle/gems/sidekiq-5.2.7/lib/sidekiq/web/application.rb:283:in `call'
/usr/local/bundle/gems/rack-protection-2.0.5/lib/rack/protection/xss_header.rb:18:in `call'
/usr/local/bundle/gems/rack-protection-2.0.5/lib/rack/protection/base.rb:50:in `call'
/usr/local/bundle/gems/rack-protection-2.0.5/lib/rack/protection/base.rb:50:in `call'
/usr/local/bundle/gems/rack-protection-2.0.5/lib/rack/protection/path_traversal.rb:16:in `call'
/usr/local/bundle/gems/rack-protection-2.0.5/lib/rack/protection/json_csrf.rb:26:in `call'
/usr/local/bundle/gems/rack-protection-2.0.5/lib/rack/protection/base.rb:50:in `call'
/usr/local/bundle/gems/rack-protection-2.0.5/lib/rack/protection/base.rb:50:in `call'
/usr/local/bundle/gems/rack-protection-2.0.5/lib/rack/protection/frame_options.rb:31:in `call'
/usr/local/bundle/gems/rack-protection-2.0.5/lib/rack/protection/base.rb:50:in `call'
/usr/local/bundle/gems/rack-2.0.7/lib/rack/session/abstract/id.rb:232:in `context'
/usr/local/bundle/gems/rack-2.0.7/lib/rack/session/abstract/id.rb:226:in `call'
/usr/local/bundle/gems/rack-2.0.7/lib/rack/urlmap.rb:68:in `block in call'
/usr/local/bundle/gems/rack-2.0.7/lib/rack/urlmap.rb:53:in `each'
/usr/local/bundle/gems/rack-2.0.7/lib/rack/urlmap.rb:53:in `call'
/usr/local/bundle/gems/rack-2.0.7/lib/rack/builder.rb:153:in `call'
/usr/local/bundle/gems/sidekiq-5.2.7/lib/sidekiq/web.rb:103:in `call'
/usr/local/bundle/gems/sidekiq-5.2.7/lib/sidekiq/web.rb:108:in `call'
/usr/local/bundle/gems/rack-2.0.7/lib/rack/urlmap.rb:68:in `block in call'
/usr/local/bundle/gems/rack-2.0.7/lib/rack/urlmap.rb:53:in `each'
/usr/local/bundle/gems/rack-2.0.7/lib/rack/urlmap.rb:53:in `call'
/usr/local/bundle/gems/rack-2.0.7/lib/rack/tempfile_reaper.rb:15:in `call'
/usr/local/bundle/gems/rack-2.0.7/lib/rack/lint.rb:49:in `_call'
/usr/local/bundle/gems/rack-2.0.7/lib/rack/lint.rb:37:in `call'
/usr/local/bundle/gems/rack-2.0.7/lib/rack/show_exceptions.rb:23:in `call'
/usr/local/bundle/gems/rack-2.0.7/lib/rack/common_logger.rb:33:in `call'
/usr/local/bundle/gems/rack-2.0.7/lib/rack/chunked.rb:54:in `call'
/usr/local/bundle/gems/rack-2.0.7/lib/rack/content_length.rb:15:in `call'
/usr/local/bundle/gems/rack-2.0.7/lib/rack/handler/webrick.rb:86:in `service'
/usr/local/lib/ruby/2.6.0/webrick/httpserver.rb:140:in `service'
/usr/local/lib/ruby/2.6.0/webrick/httpserver.rb:96:in `run'
/usr/local/lib/ruby/2.6.0/webrick/server.rb:307:in `block in start_thread'

Additional context

  • Ruby 2.6.3
  • sidekiq 5.2.7
  • sidekiq-unique-jobs 6.0.13
  • Alpine 3.9
@mhenrixon
Copy link
Owner

Such a weird thing, maybe I need to fully qualify the class.

I’ll have a look at backporting this.

@mhenrixon mhenrixon added the bug label Jun 5, 2019
@mhenrixon mhenrixon self-assigned this Jun 15, 2019
@mhenrixon mhenrixon added the v6.x label Jun 15, 2019
@metapraveen
Copy link

@looorent Are you trying to mount the sidekiq route inside rails?
I faced the same issue when I tried to serve sidekiq web using rackup since it doesn't autoload the gem. Moving it inside rails routes solved it.

@looorent
Copy link
Author

looorent commented Aug 5, 2019

@metapraveen Indeed, I should have said that I'm running Sidekiq Web inside using rackup. Here is my start ruby script:

require "sidekiq_unique_jobs/web"
run Rack::URLMap.new("/" => Sidekiq::Web)

@mhenrixon Do you think there is a way to support rackup?

@mhenrixon
Copy link
Owner

Unless you are using something to autoload your gems you would have to first require "sidekiq-unique-jobs" to make it work @looorent .

@looorent
Copy link
Author

looorent commented Aug 5, 2019

Thanks @mhenrixon, this solution works. Here is the rackup script:

require "sidekiq_unique_jobs"
require "sidekiq_unique_jobs/web"
run Rack::URLMap.new("/" => Sidekiq::Web)

@looorent looorent closed this as completed Aug 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants