Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running bash on heroku won't work

Tags:

bash

heroku

I am trying to run bash on heroku to test it out and it is failing

 $ heroku run bash
 ▸    Error: No app specified
 ▸    Usage: heroku run --app APP
 ▸    We don't know which app to run this on.
 ▸    Run this command from inside an app folder or specify which app to use with --app APP
 ▸    
 ▸    https://devcenter.heroku.com/articles/using-the-cli#app-commands


 $ heroku run --app bash
 ▸    Usage: heroku run COMMAND
 ▸    
 ▸    Example: heroku run bash

So, the example says heroku run bash will work but it doesn't. I have no dynos running. I feel I am missing something basic here...

like image 344
E.S. Avatar asked Mar 08 '16 02:03

E.S.


People also ask

How do I open heroku in Git bash?

Install Heroku on Windows machine as per the site instructions. Then, with Git Bash closed, open the Windows "Command Prompt" and type "heroku login". You will be prompted for your Heroku username and password and you're in! Close the command prompt and use bash as per normal.

Why is heroku login not working?

Double check that there are no typos in your password as well. Reset your password and try logging in with the new password. Try using a different email address. Try using an email alias with a plus sign if you might have signed up using an alias such as [email protected] instead of just [email protected].


2 Answers

Try run commands:

First you need to login, then you to see your apps and finally run bash

$heroku login

Insert you user and password

$heroku apps
=== [email protected] Apps
myaplication

then look at the list aps and write

$heroku run bash --app myaplication 
like image 148
Omar Duarte Avatar answered Sep 17 '22 17:09

Omar Duarte


I think you have two issues.

Firstly, you need to run bash within some app. You can either specify the app via the --app key as the help actually says or you can run this command inside the folder which has a heroku app initialized already. For connecting the folder to a heroku app - see this answer How to link a folder with an existing Heroku app.

Second, running a bash actually takes away one dyno from your app. So you need to have at least one dyno.

like image 28
omdv Avatar answered Sep 19 '22 17:09

omdv