Skip to content

Instantly share code, notes, and snippets.

@nplusp
Created January 27, 2017 12:51
Show Gist options
  • Save nplusp/d46d9cd3f07673e21ecfbb626d6199ad to your computer and use it in GitHub Desktop.
Save nplusp/d46d9cd3f07673e21ecfbb626d6199ad to your computer and use it in GitHub Desktop.
run scripts on Heroku
echo "puts User.count" | heroku run console --app=my-heroku-app --no-tty
cat some_script.rb | heroku run console --app=my-heroku-app --no-tty
heroku run bundle exec rails runner ./scripts/script.rb -a my-heroku-app
heroku run bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment