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.
source to share
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.
source to share