Heroku Toolbelt 无法检测到 set buildpack

Heroku Toolbelt fails to detect a set buildpack

我已尝试将我的 Rails 应用手动 clearing and setting the buildpack 到 heroku/rails。我已验证我有一个 Gemfile,但我仍然收到此错误

    remote: -----> Using set buildpack heroku/ruby
    remote:
    remote:  !     Push rejected, failed to detect set buildpack heroku/ruby
    remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
    remote:
    remote: Verifying deploy...
    remote:
    remote: !   Push rejected

这令人困惑,因为我设置了 buildpack,但它无法检测到它。我的一些路由正在呈现 json,因为我希望此应用程序用作后端 API。我需要为 Node 添加构建包吗?还有其他建议吗?

我将该应用程序放置在 git 存储库中的冗余子文件夹中。我通过将所有内容提升一个级别、重新提交和 git push heroku master 来解决问题。 Heroku 一直在寻找顶层的 Gemfile,所以我将所有应用程序文件移到了顶层(它应该一直在的地方)。

我重新初始化了repo,然后又做了一遍。做了我的承诺并推动了。成功了!!!

git init

将 heroku 添加为远程服务器

git remote add heroku https://git.heroku.com/appname.git'
git add .
git commit -m "initial commit"
git push heroku master