This guide is for you if you have attempted steps below but still has issue :
- Double checked the file name and folder structure, and it did follow Rails convention
- Added auto load and eager load path
- All previous jobs ran successfully, but only this new job you added has this uninitialized constant
- This issue only happens in your production / staging server , but it worked fine in your local development machine
- Sometimes the job executed successfully, sometimes you get the uninitialized constant error
Chances are, your server might have two or more Sidekiq process running, and the old sidekiq process has no information on this new job.
You might have just recently upgraded Sidekiq version, and forgot to kill the old sidekiq process.
SSH into your server, type ps aux | grep sidekiq
If you saw more than one sidekiq process, then bingo! The solution is to kill the old sidekiq process, kill 1234
,
replace 1234 with your old sidekiq process pid.
Thanks @anonoz