问题描述
我正在将当前的 git 存储库推送到 heroku.该在线应用程序是使用 Scala 和 IntelliJ 开发的.而且我不知道如何解决这个错误.
I was pushing the current git repository into the heroku.That online application was developed using Scala and IntelliJ.And I don't know how to fix this error.
$ git push heroku master
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 531 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: ! No default language could be detected for this app.
remote: HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically.
remote: See https://devcenter.heroku.com/articles/buildpacks
remote:
remote: ! Push failed
remote: Verifying deploy....
remote:
remote: ! Push rejected to salty-coast-14102.
remote:
To https://git.heroku.com/salty-coast-14102.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/salty-coast-14102.git'
推荐答案
阅读此文档,它将向您解释要做什么.
https://devcenter.heroku.com/articles/buildpacks
Read this doc which will explain to you what to do.
https://devcenter.heroku.com/articles/buildpacks
您可以通过设置 buildpack 值来更改应用程序使用的 buildpack.
下次推送应用程序时,将使用新的 buildpack.
$ heroku buildpacks:set heroku/php
Buildpack 套装.random-app-1234 的下一个版本将使用 heroku/php.
运行 git push heroku master
以使用此构建包创建新版本.
Buildpack set. Next release on random-app-1234 will use heroku/php.
Run git push heroku master
to create a new release using this buildpack.
这就是为什么它不适合你,因为你没有设置它.
This is whay its not working for you since you did not set it up.
... 下次推送应用程序时,将使用新的 buildpack.
您还可以在应用创建过程中指定构建包
:
$ heroku create myapp --buildpack heroku/python
这篇关于无法推送到heroku的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!