0

I am working on a rails application. On running command bundle exec sidekiq I am getting the following error -

undefined method `pool' for Sidetiq::Supervisor:Class
/.rvm/gems/ruby-2.6.3/gems/sidetiq-0.6.0/lib/sidetiq/supervisor.rb:12:in `<class:Supervisor>'
/.rvm/gems/ruby-2.6.3/gems/sidetiq-0.6.0/lib/sidetiq/supervisor.rb:2:in `<module:Sidetiq>'
/.rvm/gems/ruby-2.6.3/gems/sidetiq-0.6.0/lib/sidetiq/supervisor.rb:1:in `<top (required)>'
/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `require'
/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `block in require'
/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:240:in `load_dependency'
/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `require'
/.rvm/gems/ruby-2.6.3/gems/sidetiq-0.6.0/lib/sidetiq.rb:32:in `<top (required)>'
/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `require'
/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `block in require'
/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:240:in `load_dependency'
/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `require'
/application/engines/common/lib/common/engine.rb:17:in `<top (required)>'
/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `require'
/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `block in require'
/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:240:in `load_dependency'
/.rvm/gems/ruby-2.6.3/gems/activesupport-4.2.11.3/lib/active_support/dependencies.rb:274:in `require'
/application/engines/common/lib/common.rb:1:in `<top (required)>'
/.rvm/gems/ruby-2.6.3/gems/bundler-2.2.15/lib/bundler/runtime.rb:66:in `require'
/.rvm/gems/ruby-2.6.3/gems/bundler-2.2.15/lib/bundler/runtime.rb:66:in `block (2 levels) in require'
/.rvm/gems/ruby-2.6.3/gems/bundler-2.2.15/lib/bundler/runtime.rb:61:in `each'
/.rvm/gems/ruby-2.6.3/gems/bundler-2.2.15/lib/bundler/runtime.rb:61:in `block in require'
/.rvm/gems/ruby-2.6.3/gems/bundler-2.2.15/lib/bundler/runtime.rb:50:in `each'
/.rvm/gems/ruby-2.6.3/gems/bundler-2.2.15/lib/bundler/runtime.rb:50:in `require'
/.rvm/gems/ruby-2.6.3/gems/bundler-2.2.15/lib/bundler.rb:173:in `require'
/application/config/application.rb:17:in `<top (required)>'
/.rvm/gems/ruby-2.6.3/gems/sidekiq-4.1.4/lib/sidekiq/cli.rb:232:in `require'
/.rvm/gems/ruby-2.6.3/gems/sidekiq-4.1.4/lib/sidekiq/cli.rb:232:in `boot_system'
/.rvm/gems/ruby-2.6.3/gems/sidekiq-4.1.4/lib/sidekiq/cli.rb:50:in `run'
/.rvm/gems/ruby-2.6.3/gems/sidekiq-4.1.4/bin/sidekiq:12:in `<top (required)>'
/.rvm/gems/ruby-2.6.3/bin/sidekiq:23:in `load'
/.rvm/gems/ruby-2.6.3/bin/sidekiq:23:in `<main>'
/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:22:in `eval'
/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:22:in `<main>'

It is pointing towards this piece of code in the first line of trace -

if Sidekiq.server?
      if handler_pool_size = Sidetiq.config.handler_pool_size
        pool Sidetiq::Actor::Handler,
             as: :sidetiq_handler,
             size: handler_pool_size
      else
        # Use Celluloid's CPU-based default.
        pool Sidetiq::Actor::Handler,
             as: :sidetiq_handler
      end
    end

I am not able to find out the root of this error.

Is there any gem that I am missing?

Does anyone has any idea how to resolve this issue?

Please help! Its important!

User
  • 169
  • 1
  • 11
  • I don't know Sidetiq. Yet Sidekiq 4.1.4 is from July 2016 and Ruby 2.6.3 is much newer. They may not be compatible with each other. Also Sidetiq is no longer maintained since 2017 due to Sidekiq subsequent changes. – Maxence Apr 12 '21 at 15:11
  • @Maxence I have updated the Sidekiq version but I am still getting the same error. – User Apr 13 '21 at 06:50
  • Sidetiq is no longer maintained since 2017 sur to breaking changes in Sidekiq (go read the repo it is explained). So if you update Sidekiq to latest version, it will break for sure. Best would be to keep Sidekiq and Sidetiq original versions, and try to run the app with Ruby 1.9 or such – Maxence Apr 14 '21 at 21:27

0 Answers0