views:

17

answers:

1

I am trying to run delayed_job on heroku and it doesn't appear to be working. So I went into the heroku console to check out what might be going on with the following:

Delayed::Job.find(:last)

This is what I came back with:

=> #<Delayed::Job id: 241, priority: 0, attempts: 22, handler: "--- !ruby/struct
:SomeMailJob \ncontact: !ruby/object...", last_error: "undefined method `subject
' for #<YAML::Object:0x2ab...", run_at: "2010-09-20 05:26:52", locked_at: nil, f
ailed_at: nil, locked_by: nil, created_at: "2010-09-10 03:31:05", updated_at: "2
010-09-17 23:25:26">

I'm not sure what to do with this...I don't know what this YAML object is or why it is undefined....how can I start to drill down better?

A: 

Take a look at the perform method in SomeMailJob. That will give you more clues. You might also want to print the last_error to get the full stack trace. puts Delayed::Job.find(:last).last_error will do it for you.

Swanand
is there a way for me to inspect the object?
Angela
`Object#inspect` will yield what you have already printed. You can however override the `to_s` method and make it more readable.
Swanand