heroku - 在打开 heroku 的情况下获取多个应用程序的列表
问题描述
我有一个 rails 项目,我已经将它部署在 heroku 上。当我尝试在浏览器上打开时遇到问题heroku open
,它返回一个如下所示的列表:
▸ Multiple apps in git remotes
▸ Usage: --remote heroku-stagin
▸ or: --app still-falls-46284
▸ Your local git repository has more than 1 app referenced in git remotes.
▸ Because of this, we can't determine which app you want to run this command against.
▸ Specify the app you want with --app or --remote.
▸ Heroku remotes in repo:
▸ still-falls-46284 (heroku)
▸ still-falls-46284 (heroku-stagin)
▸ still-falls-46284 (still-falls-46284)
▸
▸ https://devcenter.heroku.com/articles/multiple-environments
我输入的一些命令:
- heroku 创建
- git push heroku 大师
- heroku 打开
- heroku open --remote still-falls-46284
- heroku run rails c --app still-falls-46284
解决方案
如果您尝试推送到您的heroku
服务器,请执行以下操作:
git push heroku master
如果您尝试推送到您的heroku-stagin
服务器:
git push heroku-stagin master
如果您的still-falls-46284
分支也是 heroku 应用程序,并且您正在尝试将其推送到该应用程序,请执行以下操作:
git push still-falls-46284 master
推荐阅读
- python - cython;pyside2;RecursionError: 调用 Python 对象时超出最大递归深度
- glsl - 传递超过一种大小的 GLSL 数组参数
- javascript - 我的有效 SendGrid API 密钥无法通过 NodeJS 工作
- c++ - 如何使智能感知将当前源文件视为独立的翻译单元
- powerbi - 尝试配置 Power BI 数据时出错 Gatwewy
- sql - 使用 SQL 舍入日期
- javascript - 将 PNG 图像导入为像素矩阵
- bash - 需要帮助 bash 脚本从文件中解析数据
- ruby-on-rails - 计算并在视图中显示用户年龄
- javascript - 从 textarea 添加输入数字