I'm trying to use pry-rescue inside of a rake task. Something like this:
bundle exec rescue rake my:task
But when an exception occurs ( undefined method...
) it just exists like normal. How can I use pry-rescue with my rake task?
Did you try wrapping your task body in a rescue block?
task 'my_task' do
Pry.rescue {
things.that_need_doing
}
end
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.