【问题标题】:how to disable asset pipeline on heroku?如何禁用heroku上的资产管道?
【发布时间】:2011-12-26 18:29:49
【问题描述】:

heroku cedar 隐式预编译我的资产,即使我已经写过:

config.assets.enabled = false

如何禁用资产功能?

【问题讨论】:

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


    【解决方案1】:

    问题是编译 slug 时应用程序配置不可用。最近通过http://devcenter.heroku.com/articles/labs-user-env-compile 解决了这个问题,但我不确定这是否会有所帮助。

    有关 Heroku 管道的更多信息,请查看 http://devcenter.heroku.com/articles/rails31_heroku_cedar

    看起来阻止资产编译的最简单方法是将文件放在 public/assets/manifest.yml 中 - 会假定内容无关紧要,但也可以通过 config.assets.enabled 禁用它以防万一。

    【讨论】:

    • 我都做了,但它仍然试图编译资产。我在这里遗漏了什么?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-05-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-07-04
    • 1970-01-01
    • 2014-05-23
    相关资源
    最近更新 更多