Running bash on heroku won't work

时光怂恿深爱的人放手 提交于 2020-05-11 03:26:44

问题


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...


回答1:


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
=== user@gmail.com Apps
myaplication

then look at the list aps and write

$heroku run bash --app myaplication 



回答2:


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.



来源:https://stackoverflow.com/questions/35857787/running-bash-on-heroku-wont-work

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!