我正在开发一个 Rails 应用程序。在运行命令bundle exec sidekiq
时,我收到以下错误 -
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>'
它指向跟踪第一行中的这段代码 -
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
我无法找出这个错误的根源。
有没有我想念的宝石?
有谁知道如何解决这个问题?
请帮忙!这一点很重要!