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

undefined method delete' for class Sidekiq::Job' #634

Closed
marmeladze opened this issue Sep 2, 2021 · 3 comments
Closed

undefined method delete' for class Sidekiq::Job' #634

marmeladze opened this issue Sep 2, 2021 · 3 comments

Comments

@marmeladze
Copy link

marmeladze commented Sep 2, 2021

Describe the bug
Rails app crashes when I invoke a command, such as rails g migration, rails s, rails c etc.

Expected behavior
rails g migration should generate a migration file and touch schema,
rails s should start dev server with given option

Current behavior
All commands raises

undefined method delete' for class Sidekiq::Job'

Full stacktrace

	51: from bin/rails:4:in `<main>'
	50: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	49: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	48: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	47: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	46: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	45: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/railties-5.2.6/lib/rails/commands.rb:18:in `<main>'
	44: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/railties-5.2.6/lib/rails/command.rb:46:in `invoke'
	43: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/railties-5.2.6/lib/rails/command/base.rb:69:in `perform'
	42: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
	41: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
	40: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
	39: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/railties-5.2.6/lib/rails/commands/server/server_command.rb:142:in `perform'
	38: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/railties-5.2.6/lib/rails/commands/server/server_command.rb:142:in `tap'
	37: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/railties-5.2.6/lib/rails/commands/server/server_command.rb:145:in `block in perform'
	36: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	35: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	34: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	33: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	32: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	31: from /vagrant/backend/config/application.rb:8:in `<main>'
	30: from /home/vagrant/.rvm/rubies/ruby-2.6.4/lib/ruby/site_ruby/2.6.0/bundler.rb:114:in `require'
	29: from /home/vagrant/.rvm/rubies/ruby-2.6.4/lib/ruby/site_ruby/2.6.0/bundler/runtime.rb:65:in `require'
	28: from /home/vagrant/.rvm/rubies/ruby-2.6.4/lib/ruby/site_ruby/2.6.0/bundler/runtime.rb:65:in `each'
	27: from /home/vagrant/.rvm/rubies/ruby-2.6.4/lib/ruby/site_ruby/2.6.0/bundler/runtime.rb:76:in `block in require'
	26: from /home/vagrant/.rvm/rubies/ruby-2.6.4/lib/ruby/site_ruby/2.6.0/bundler/runtime.rb:76:in `each'
	25: from /home/vagrant/.rvm/rubies/ruby-2.6.4/lib/ruby/site_ruby/2.6.0/bundler/runtime.rb:81:in `block (2 levels) in require'
	24: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	23: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	22: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	21: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	20: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	19: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/sidekiq-unique-jobs-6.0.25/lib/sidekiq-unique-jobs.rb:3:in `<main>'
	18: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	17: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	16: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	15: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	14: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	13: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/sidekiq-unique-jobs-6.0.25/lib/sidekiq_unique_jobs.rb:32:in `<main>'
	12: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
	11: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
	10: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
	 9: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
	 8: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/bootsnap-1.8.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
	 7: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/sidekiq-unique-jobs-6.0.25/lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb:5:in `<main>'
	 6: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/sidekiq-unique-jobs-6.0.25/lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb:50:in `<module:Sidekiq>'
	 5: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/sidekiq-unique-jobs-6.0.25/lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb:65:in `<class:Job>'
	 4: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/sidekiq-unique-jobs-6.0.25/lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb:65:in `include'
	 3: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/sidekiq-unique-jobs-6.0.25/lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb:53:in `included'
	 2: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/sidekiq-unique-jobs-6.0.25/lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb:53:in `class_eval'
	 1: from /home/vagrant/.rvm/gems/ruby-2.6.4/gems/sidekiq-unique-jobs-6.0.25/lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb:54:in `block in included'
/home/vagrant/.rvm/gems/ruby-2.6.4/gems/sidekiq-unique-jobs-6.0.25/lib/sidekiq_unique_jobs/sidekiq_unique_ext.rb:54:in `alias_method': undefined method `delete' for class `Sidekiq::Job' (NameError)
Did you mean?  delegate

Worker class

N/A

Additional context

Sidekiq versions

    sidekiq (6.2.2)
    sidekiq-bulk (0.2.0)
      sidekiq
    sidekiq-scheduler (3.1.0)
      sidekiq (>= 3)
    sidekiq-unique-jobs (6.0.25)
      sidekiq (>= 4.0, < 7.0)
  sidekiq
  sidekiq-bulk
  sidekiq-scheduler
  sidekiq-unique-jobs (~> 6)

@marmeladze
Copy link
Author

Downgrading sidekiq gem to version 6.1.3 solved the problem. I don't have proper debugging tools to inspect the reason. But if a rep. commiter guides me, I can create a patch/fix to resolve this issue.

@mhenrixon
Copy link
Owner

I will look into it today.

@mhenrixon
Copy link
Owner

This has been fixed in v7.1.6

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

2 participants