如何在heroku上禁用资产管道? [英] how to disable asset pipeline on heroku?

查看:104
本文介绍了如何在heroku上禁用资产管道?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  config.assets.enabled = false $ b我的资料隐式地预先编译了我的资产$ b  

如何禁用资产功能?

解决方案

问题是编译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将其禁用以防万一。


The heroku cedar precompile my assets implicitly, even though I have written:

config.assets.enabled = false

How to disable the assets feature?

解决方案

The problem is that the application config isn't available when the slug is compiled. This was recently addressed with http://devcenter.heroku.com/articles/labs-user-env-compile but I'm not sure if that will help here.

For more info on the pipeline on Heroku take a look at http://devcenter.heroku.com/articles/rails31_heroku_cedar

It looks like the easiest way to prevent asset compilation is to put a file in public/assets/manifest.yml - would presume contents is irrelevant but also disable it via config.assets.enabled just in case.

这篇关于如何在heroku上禁用资产管道?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆