Wrapped NoMethodError: undefined method `enqueue'' for Jobs::Jobs:Module

(0.3ms)  BEGIN
  MiniScheduler::Stat Update (0.8ms)  UPDATE "scheduler_stats" SET "duration_ms" = 19, "live_slots_finish" = 919924, "success" = FALSE, "error" = 'Jobs::HandledExceptionWrapper: Wrapped NoMethodError: undefined method `enqueue'' for Jobs::Jobs:Module /Users/faiz/discenv/discourse/app/jobs/base.rb:256:in `perform''
/Users/faiz/discenv/discourse/app/jobs/base.rb:279:in `perform''
/Users/faiz/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/mini_scheduler-0.12.2/lib/mini_scheduler/manager.rb:86:in `process_queue''
/Users/faiz/.rbenv/versions/2.6.2/lib/ruby/gems/2.6.0/gems/mini_scheduler-0.12.2/lib/mini_scheduler/manager.rb:36:in `block (2 levels) in initialize''' WHERE "scheduler_stats"."id" = 554
   (1.1ms)  COMMIT

I keep getting this error during development since updating my dev environment just after Zeitwerk was merged into master. It hasn’t affected my work yet, but it keeps popping up every now and then in my console.

You need to prefix the parent class with ::.

Here’s an example:

https://github.com/discourse/discourse-zendesk-plugin/commit/da30b6e603235ea78ef026ac8ab3f5f9b91eb47c

9 Likes

Thanks a lot for this. I realize that its coming from one of the installed plugins on my setup.

2 Likes