Sprockets/Asset Pipeline in Rails 2.3

前端 未结 2 475
抹茶落季
抹茶落季 2021-01-15 02:14

I\'ve followed the very thorough instructions below to add sprockets/asset pipeline to a legacy Rails 2.3.18 application I\'m working on:

http://jaredonline.github.i

2条回答
  •  天涯浪人
    2021-01-15 02:45

    @joris provided good insight, but I had already figured it out by the time you replied!

    Inside assets.rake#internal_precompile, change the last line to:

    manifest.compile [ Proc.new { |path| !%w(.js .css).include?(File.extname(path)) }, /application.(css|js)$/ ]

    Found this answer a little ways down on this page: http://guides.rubyonrails.org/asset_pipeline.html#precompiling-assets

提交回复
热议问题