May 03, 2017
Ever wanted to run some kind of one-off thing without pushing up a rake task? I came across this today and needed to clear out some database records. This works wonderfully:
heroku run:detached rails runner 'SomeModel.long_running_method' -r heroku
Written by Jonathan Cutrell, engineer and podcast host amongst other things. You can follow him on Twitter at @jcutrell.