You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I love the idea of this gem.
In my config/initializers/zhong.rb I did:
Zhong.schedule do
every 5.seconds, 'MyJob' do
MyJob.perform_later
end
end
However when I run zhong I get MyJob failed: uninitialized constant MyJob . MyJob is located in app/jobs/...
I can do hacky things to load but has anyone tried this and hopefully come up w a better solution? What would be the best way to autoload Rails classes?
The text was updated successfully, but these errors were encountered:
dmitrypol
changed the title
Best way to run Ruby classes / jobs
Best way to run Ruby classes / Rails jobs
Jan 2, 2018
dmitrypol
changed the title
Best way to run Ruby classes / Rails jobs
Best way to run Rails classes / jobs
Jan 2, 2018
I love the idea of this gem.
In my config/initializers/zhong.rb I did:
However when I run zhong I get
MyJob failed: uninitialized constant MyJob
.MyJob
is located inapp/jobs/...
I can do hacky things to load but has anyone tried this and hopefully come up w a better solution? What would be the best way to autoload Rails classes?
The text was updated successfully, but these errors were encountered: