【问题标题】:Heroku error message no Cedar-supported app detectedHeroku 错误消息未检测到 Cedar 支持的应用程序
【发布时间】:2015-09-28 14:26:42
【问题描述】:

所以,我在使用 heroku 和这个 rails 教程时遇到了更多问题。我正在制作的 Rails 教程让我开发了一个超级基本的应用程序。然后他们让我创建了一个比特桶帐户。在此之后,他们让我创建了一个 Heroku 帐户。现在他们要求我将我的 origin master 推送到我的 heroku 主机。当我这样做时,我收到此错误消息,我无法弄清楚。有人对我如何解决这个问题有任何提示吗?提前非常感谢!

alopex@alopex-TH55-HD:~/work-space$ git push heroku master
Counting objects: 66, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (55/55), done.
Writing objects: 100% (66/66), 16.39 KiB | 0 bytes/s, done.
Total 66 (delta 2), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:  !     Push rejected, no Cedar-supported app detected
remote: HINT: This occurs when Heroku cannot detect the buildpack
remote:       to use for this application automatically.
remote: See https://devcenter.heroku.com/articles/buildpacks
remote: Building source:
remote: 
remote: 
remote:  !     Push rejected, no Cedar-supported app detected
remote: HINT: This occurs when Heroku cannot detect the buildpack
remote:       to use for this application automatically.
remote: See https://devcenter.heroku.com/articles/buildpacks
remote: 
remote: Verifying deploy....
remote: 
remote: !   Push rejected to safe-badlands-5004.
remote: 
To https://git.heroku.com/safe-badlands-5004.git
! [remote rejected] master -> master (pre-receive hook declined)

【问题讨论】:

  • 你需要在你的项目文件夹中。

标签: heroku cedar


【解决方案1】:

您需要将cd 添加到您的项目目录中,因为我假设~/work-space 不是您的应用程序的名称。

执行以下操作:cd path/to/root/of/your/project 并再次尝试该命令。

更新

从历史上看,解决此问题的主要方法是以下两种情况之一:

正确命名您的 .buildpacks 文件(确保它不是 .buildpack

重新初始化您的 .git 文件:

rm -rf .git
git init
git add .
git commit -am "Reinitialize"
heroku create --stack cedar
git push heroku master

【讨论】:

  • 我已更新我的答案以包含其他各种修复。
【解决方案2】:

我明白了!天哪,我明白了!

咳咳……


所以,史蒂夫和科林是正确的。事实上,我确实需要在我的项目目录中,这样 Heroku 才能感知我的 Ruby 文件并相应地进行操作。当我将我的初始应用程序推送到 Bit Bucket 时,我搞砸了。我将我的应用程序推送到主目录内的 Bit Bucket 上。这使我的应用程序成为一个子文件夹,这反过来又使 Heroku 无法检测到它的存在。

解决方案是选择我的所有应用程序,单击并将其拖动到桌面并删除虚假的主文件夹。我继续将我的文件放回 Bit Bucket 存储库,然后添加、提交并将其推送到 Bit Bucket。

如果您遇到这种情况,请确保您也将应用程序中的隐藏文件夹也拖到新文件夹中,因为这真的会让您感到困惑。

谢谢大家!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-01-11
    • 2012-12-05
    • 2014-11-09
    • 2013-03-08
    • 1970-01-01
    • 2015-07-18
    • 1970-01-01
    • 2014-01-22
    相关资源
    最近更新 更多