Menu

Useful Heroku Commands

February 11, 2015 - Rails

1) heroku console app my_app  

2) heroku rake db:migrate app my_app  

3) heroku stack app my_app 

4) heroku pg:reset SHARED_DATABASE_URL –confirm my-app-name

5) heroku run console –sandbox

6) heroku apps

 

Heroku Cheatsheet (Useful Heroku Commands Reference)

Posted by on Feb 15, 2012 in Geek, How To | One Comment

Basics

Update Command-line Tool
 heroku update
Help
 heroku help

Get Started

Create App
 heroku create --stack cedar [<appname>]
Deploy App
 git push heroku master
Open App in Web Browser
 heroku open

Useful Info About Your App

Basic App Info
 heroku info
View App Config
 heroku config
Show State of App
 heroku ps
Show App Logs
 heroku logs

Advanced (Run Tasks/Database/Scaling)

Run task on Heroku (i.e. Rake tasks)
 heroku run rake task:name
Pull/Push Database (Use with Caution! Potentially Destructive.)
 heroku db:pull
 heroku db:push
Scale Web Process
 heroku ps:scale web=1
Set timezone for app. (Use TZ time zones from here [wikipedia].)
 heroku config:add TZ=America/Vancouver

 

 

 

reference

Leave a Reply