是否可以在 Rails 3.2 的开发模式下提供压缩的 js?Gemfile 包含
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
...它永远不会得到服务。