Fix for running rake tasks via delayed_job