In my case, I ran heroku ps:restart to restart all dynos, and the heroku run * heroku run * again heroku run * .
Examples
If you have only one Git remote for Heroku, use this:
heroku ps:restart && heroku run *
If you have several Git remotes for Heroku, use this:
heroku ps:restart --remote your-remote-name && heroku run * --remote your-remote-name
OR
heroku ps:restart --app your-heroku-app-name && heroku run * --app your-heroku-app-name
Replace * your command, for example, console for the Rails console.
What I meant by your-heroku-app-name is a subdomain for your Heroku application. For example, if the URL of your application is https://cute-cat.herokuapp.com , this means that your-heroku-app-name is cute-cat .
If you are not sure / forgot how your name is Git remote for Heroku, git remote -v can help you with this.
Example:
$ git remote -v this-is-the-remote-name https://git.heroku.com/xxx.git (fetch) this-is-the-remote-name https://git.heroku.com/xxx.git (push) this-is-another-remote-name https://git.heroku.com/yyy.git (fetch) this-is-another-remote-name https://git.heroku.com/yyy.git (push)
Zulhilmi Zainudin Dec 11 '18 at 20:19 2018-12-11 20:19
source share