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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s