No app specified: telling Heroku gem what its default --app should be

Back | git, heroku | 8/8/2011 |

On a clean checked out source of some app that deploys to Heroku, I want to be able to type heroku config. This complains with  the 'No app specified’ error.

  1. No app specified.
  2. Run this command from an app folder or specify which app to use with --app <app name>

To fix this, you need to add a remote Git repository for your heroku application and tell the heroku gem to use it as default. Answer found here. Like this.

  1. git remote add heroku git@heroku.com:your-app-name.git
  2. git config heroku.remote heroku

You can now git push heroku master and run heroku config without having to specify the app. I often deploy branches, which is git push heroku branch-name:master.