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

! No such app as [app name].

You will face this error if you have rename your app from web interface.
Here are two ways to tackle this issue:


git remote set-url heroku 

You can get the new URL from the web interface.

2) Update the git remote for the app:

git remote rm heroku
git remote add heroku git@heroku.com:yourappname.git