Topic: DelayedJob ion Rails 3: Exception NameError -> uninitialized constant
I'm building a Rails 3 app that uses delayed_job to schedule asynchronous tasks in the background.
It works fine when I use the .delay method or .handle_asynchronously to queue a job, but when I use a custom job it doesn't work.
This is what I have:
In my lib folder I have the Ruby class with the perform method in a file called my_job.rb that contains:
class MyJob < Struct.new(:text)
and in my controller I have this:
When I call the controller I get the following error:
Exception NameError -> uninitialized constant Delayed::Job
Any ideas on how to solve this issue?