Disable Asset Pipeline/Sprockets Rails 4.1

旧街凉风 提交于 2019-11-29 05:32:05

You can disable the asset pipeline in config/application.rb by adding the following line to it :

config.assets.enabled = false

You could also turn off asset pipeline while creating a new rails application by passing the --skip-sprockets option to it:

rails new myappname --skip-sprockets

Add this to your config/application.rb:

config.assets.enabled = false

config.generators do |g|
  g.assets false
end

This will disable the asset pipeline and it will prevent the cli generator from creating assets when generating a scaffold.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!