Over a million developers have joined DZone.

Heroku “No app specified”

DZone's Guide to

Heroku “No app specified”

A super-quick fix for anyone with multiple Heroku apps.

· Cloud Zone
Free Resource

MongoDB Atlas is a database as a service that makes it easy to deploy, manage, and scale MongoDB. So you can focus on innovation, not operations. Brought to you in partnership with MongoDB.

I've been having a maddening problem where one (but only one) of my Heroku apps doesn't know which Heroku app it is, which means I need to append --app app-name to every single command. It seemed to happen when I moved my app to an organisation rather than having it on my personal account, but in fact the problem was that at the same time I moved the app I set up the build server to deploy it - and so I removed the old Heroku Git remote and then never added the new one because I exactly shouldn't be pushing to Heroku from my laptop as we now deploy via Jenkins.

I was looking for some config file or something that Heroku would read, but what it actually does is look at whether any of your Git remotes are Heroku - and if so, assume by default that you mean that project! The git URL is on the "Settings" screen from the Heroku web interface, and you just need to add it as a remote to your local project:

git remote add heroku [paste git url from settings screen]

Hopefully this helps someone else stop having to type --app app-name every time they need to do something with their app. It was a tiny problem but quite an annoying one!

MongoDB Atlas is the best way to run MongoDB on AWS — highly secure by default, highly available, and fully elastic. Get started free. Brought to you in partnership with MongoDB.


Published at DZone with permission of Lorna Mitchell, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}