2
Rails 3.2中的開發模式中可以使用壓縮的js嗎?的Gemfile包含Rails 3.2和資產管道:開發模式下的JavaScript壓縮
gem "closure-compiler"
和development.rb包含
config.serve_static_assets = true
config.assets.compile = false
config.assets.debug = false
config.assets.js_compressor = :closure
config.assets.compress = true
有拼命地跑
RAILS_ENV=development bundle exec rake assets:precompile
而且,即使已編譯的application.js是那裏:
./public/assets/application/application.js
./public/assets/application/application.js.gz
./public/assets/jasmine_rails/application.js
./public/assets/jasmine_rails/application.js.gz
......它永遠不會得到滿足。