Heroku Commands

  1. check log:
    Heroku logs -t

    More over:

    heroku logs --source app -t --ps web -a [app_name]

    Filter used in above command are for:
    –source app => logs generated from within your application
    –ps web/worker => to fetch logs with a certain source(web/worker/router)

  2. enlist environment variables:
    heroku run console 
    config = ActiveRecord::Base.configurations[Rails.env] || Rails.application.config.database_configuration[Rails.env]
  3. open terminal at heroku:
    heroku run bash

    And here you can do anything like local terminal. e.g: check database.yml

    cat database.yml
  4. List all the process:
    heroku ps -a myapp
  5. To kill any process:
    heroku ps:stop [process_name_along_dot_followed_by_number]
    heroku ps:stop run.5479