How to run a rake task in a Rails app?

What is the recommended way to run one-off rake tasks in a Rails app?

I’ve tried using /cnb/process/rake, but the session always hangs, returning no output.

The session hangs when you SSH in and then run it?

I’m not sure it will help, but you can SSH in and try running:

launcher rake ...

The buildpack images get a launcher command that does some magic.

Thanks Kurt, this works amazingly well, and running launcher rails console can launch a console without issues!

When I run launcher in the ssh console I receive back launcher: not found.