【问题标题】:No Cedar supported app detected error in Sinatra Heroku app在 Sinatra Heroku 应用程序中没有检测到雪松支持的应用程序错误
【发布时间】:2012-01-11 07:38:05
【问题描述】:

当我推送到 Heroku 时,似乎一切正常,如下所示。然后我在关注 Heroku 的文档时遇到了后者的错误:http://devcenter.heroku.com/articles/ruby#install_the_heroku_commandline_client

-----> Heroku receiving push
-----> Removing .DS_Store files
-----> Ruby app detected
-----> Installing dependencies using Bundler version 1.1.rc.7
       Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment
       Fetching gem metadata from http://rubygems.org/.....
       Installing rack (1.4.0)
       Installing tilt (1.3.3)
       Installing sinatra (1.1.0)
       Using bundler (1.1.rc.7)
       Your bundle is complete! It was installed into ./vendor/bundle
       Cleaning up the bundler cache.
-----> Discovering process types
       Procfile declares types -> (none)
       Default types for Ruby  -> console, rake
-----> Compiled slug size is 16.3MB
-----> Launching... done, v4
       http://cold-mountain-8923.herokuapp.com deployed to Heroku

使用 heroku.logs 我得到:

2012-01-11T06:36:43+00:00 heroku[slugc]: Slug compilation started
2012-01-11T06:36:43+00:00 heroku[slugc]: Slug compilation failed: no Cedar-supported app detected
2012-01-11T06:47:20+00:00 heroku[slugc]: Slug compilation started
2012-01-11T06:47:22+00:00 heroku[slugc]: Slug compilation failed: failed to compile Ruby app
2012-01-11T06:52:21+00:00 heroku[slugc]: Slug compilation started

当 Gemfile 和 Procfile 都在其中时,如何没有检测到 Cedar 支持? 此外,heroku 网页上没有任何内容。

【问题讨论】:

  • Procfile 的内容是什么?
  • 网络:播放运行 --http.port=$PORT $PLAY_OPTS
  • 刚刚改成:web: bundle exec ruby sinatra.rb -p $PORT
  • @BrandonTilley 你认为你可以快速浏览一下我的来源吗?这只是一个非常简单的静态 sinatra 应用程序。 github.com/TonyNg/Landing-Page
  • 不想告诉你,但它对我来说很好用。 growing-dawn-4276.herokuapp.com

标签: ruby heroku sinatra cedar


【解决方案1】:

对我来说很好——仔细检查你的 Procfile 在 Heroku 上是最新的。这是我推送的输出:

Counting objects: 46, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (28/28), done.
Writing objects: 100% (46/46), 15.23 MiB | 774 KiB/s, done.
Total 46 (delta 11), reused 46 (delta 11)

-----> Heroku receiving push
-----> Removing .DS_Store files
-----> Ruby/Rack app detected
-----> Installing dependencies using Bundler version 1.1.rc.7
       Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment
       Fetching gem metadata from http://rubygems.org/.....
       Installing rack (1.4.0)
       Installing rack-protection (1.2.0)
       Installing tilt (1.3.3)
       Installing sinatra (1.3.2)
       Using bundler (1.1.rc.7)
       Your bundle is complete! It was installed into ./vendor/bundle
       Cleaning up the bundler cache.
-----> Discovering process types
       Procfile declares types     -> web
       Default types for Ruby/Rack -> console, rake
-----> Compiled slug size is 16.5MB
-----> Launching... done, v4
       http://growing-dawn-4276.herokuapp.com deployed to Heroku

To git@heroku.com:growing-dawn-4276.git
 * [new branch]      master -> master

【讨论】:

  • 谢谢布兰登!实际上,知道它对您有用只是为我提供了解决方案。我在 Github 上克隆了我的应用程序,删除了我原来的 heroku 应用程序,并创建了一个新应用程序。现在我让它运行起来了!
  • @Tony 你是说你的两个(相同的)应用程序之间没有区别,除了一个运行正常而一个没有运行?
【解决方案2】:

我在 Github 上克隆了我的应用程序,删除了我原来的 Heroku 应用程序,并创建了一个新应用程序。现在我让它运行了!我的结论是,最初的 Heroku 应用程序是在我进行所有新更改之前创建的,并且提交只是没有得到更新或以某种方式正确推送。通过创建一个新应用程序,我不会丢失任何东西,因为代码是相同的,而且 Heroku 允许创建丰富的应用程序。我怀疑这与我没有考虑到的 git 远程问题有关。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-01-27
    • 2015-09-28
    • 1970-01-01
    • 2013-03-08
    • 1970-01-01
    相关资源
    最近更新 更多