【问题标题】:Why does Heroku continue deployement even if rake assets:precompile fails?为什么即使 rake assets:precompile 失败 Heroku 仍会继续部署?
【发布时间】:2012-05-09 22:32:21
【问题描述】:

在 heroku 上部署时,即使 rake assets:precompiles 失败,heroku 也会继续部署。

为什么它是默认行为?如果 rake assets:precompile 失败,有没有办法阻止 heroku 部署版本?谢谢。

   -----> Writing config/database.yml to read from DATABASE_URL
   -----> Preparing app for Rails asset pipeline
          Running: rake assets:precompile
          rake aborted!
          The line was indented 2 levels deeper than the previous line.
          (in /tmp/build_3tgkcip2wq2qv/app/assets/stylesheets/master.css.sass)

          Tasks: TOP => assets:precompile:primary
          (See full trace by running task with --trace)
          Precompiling assets failed, enabling runtime asset compilation
          Injecting rails31_enable_runtime_asset_compilation
          Please see this article for troubleshooting help:
          http://devcenter.heroku.com/articles/rails31_heroku_cedar#troubleshooting
   -----> Rails plugin injection
          Injecting rails_log_stdout
          Injecting rails3_serve_static_assets
   -----> Discovering process types
          Procfile declares types      -> (none)
          Default types for Ruby/Rails -> console, rake, web, worker
   -----> Compiled slug size is 52.9MB
   -----> Launching... done, v163

【问题讨论】:

  • 您找到实现此目的的方法了吗?或者一种禁用运行时资产编译的方法,所以至少你会注意到它?或者其他自动检测资产编译失败的方法?
  • 对此有任何说法或解决方法吗?

标签: ruby-on-rails ruby-on-rails-3 heroku


【解决方案1】:

因为即使资产编译失败,应用程序也能够处理不涉及资产的请求,f.x。服务 REST xml 或 json 请求。

【讨论】:

  • 这不是一个好的理由。它正在部署一个潜在(可能)损坏的应用程序。它至少应该是部署失败的一个选项。事实上,最好有一些 API 来执行此操作,以便其他部署任务(和其他构建包)可以触发部署失败并阻止部署。
猜你喜欢
  • 2018-08-10
  • 2015-03-10
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-05-31
  • 1970-01-01
  • 2014-08-04
相关资源
最近更新 更多