新手问题 Rails 如何禁用 Assets Pipline

kitt · 2013年05月13日 · 最后由 yan32768 回复于 2013年05月13日 · 2586 次阅读

assets 中的 js,css 特性用着不喜欢,如何禁用他呢,还是习惯在 public 中放着些文件

我也想用,每次编译好麻烦,并且不知道为什末,在 development 环境下,也需要编译才管用

In Rails 3.1, the asset pipeline is enabled by default. It can be disabled in config/application.rb by putting this line inside the application class definition:

config.assets.enabled = false

You can also disable the asset pipeline while creating a new application by passing the —skip-sprockets option.

rails new appname --skip-sprockets

You should use the defaults for all new applications unless you have a specific reason to avoid the asset pipeline 这应该是答案吧。来自 http://guides.rubyonrails.org/asset_pipeline.html

需要 登录 后方可回复, 如果你还没有账号请 注册新账号