How can I use ruby-debugger inside a resque job?

I'm looking for a command to start a workflow so that inside the job perform method I can call debugger and have control that was passed on the command line.

+4
source share
3 answers

I ended up using pry instead of ruby-debugger. It works like a charm. Almost Irish charm!

0
source

instead of calling Resque.enqueue(Archive, self.id, branch) (from resque readme), I think you should be able to call Archive.perform(self.id, branch) . In this case, you can use the debugger inside the worker.

+1
source

Add the following line to your application rails Resque.inline = true, this leads to the fact that resque jobs are not queued, but are executed immediately.

+1
source

All Articles