一些背景知识:我正在部署一个使用Python和Flask构建的Web应用程序。我有一个PostgreSQL数据库。这是我在Heroku上部署的第一个项目-感谢您的耐心配合。我正在使用Mac。我已经准备好Procfile,requirements.txt,runtime.txt和gunicorn。该Web应用程序运行正常,这只是我停留的最后一步(部署)。
问题在于,当我git push heroku master
这样做时,我会收到Updates were rejected because the remote contains work that you do not have locally
。 This is usually caused by another repository pushing to the same ref.
,当我执行heroku logs -t
时收到H14错误。
我的构建日志状态:
检测到Python应用 !请求的运行时(python-3.7.6 gunicorn)无法用于此堆栈(heroku-18)。 !中止。更多信息:https://devcenter.heroku.com/articles/python-support!推送被拒绝,无法编译Python应用。 !推送失败
到目前为止我已经尝试过:
正在检查heroku以获得解释。我尝试过heroku buildpacks:clear
,然后尝试过heroku buildpacks:add --index heroku/python
,但随后遇到错误Error: Expected an integer but received: heroku/python.
git push --force heroku master
我得到[remote rejected] master -> master (pre-receive hook declined)