A
A
Anton Misyagin2015-08-20 23:18:41
Ruby on Rails
Anton Misyagin, 2015-08-20 23:18:41

How to enable uglifier for js compression and compress css in development?

Gemfile:
gem 'uglifier'
development.rb:

config.assets.prefix = "/dev-assets"
  config.assets.debug = false
  config.assets.raise_runtime_errors = true
  config.assets.digest = true
  config.assets.js_compressor = :uglifier
  config.assets.compress = true

I end up with a large application.js and application.css glued together that assemble correctly but don't shrink at all. I would like to test in development before production. First time doing this. Is it possible to shrink in development?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Kononenko, 2015-08-20
@premas

Why not just do:

RAILS_ENV=production rake assets:precompile
RAILS_ENV=production rails s

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question