gpt4 book ai didi

ruby-on-rails - 为什么 Heroku 即使 rake assets :precompile fails? 也会持续部署

转载 作者:行者123 更新时间:2023-12-01 05:32:48 28 4
gpt4 key购买 nike

在 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

最佳答案

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

关于ruby-on-rails - 为什么 Heroku 即使 rake assets :precompile fails? 也会持续部署,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10515533/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com