Uninitialized permanent third party worker

New rail project.

Rails 5.0.2 Sidekiq 4.2.10

I ran rails g sidekiq:worker deposit_collector

and then filled in the code I needed inside the method perform

.

To verify that I went into the rails console and typed: DepositCollector.perform_async

and I get the error:

NameError: uninitialized constant DepositCollectorWorker

      

The worker is where it should be in the folder app/workers/

. I have used sidekiq for several projects before and have never come across this.

+6


source to share


1 answer


By default, Rails will include all subdirectories in a folder app

in the Spring Application Preloader list with:

spring stop

      



Then start the Rails console again and the files in the folder app/workers

will download correctly.

+17


source







All Articles