From 42d9dedad1ecc6d0adf3f86dd9bebf8f0db5cb2a Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 15 Oct 2014 16:08:00 -0400 Subject: [PATCH] Check if `Uglifier` is defined (we're precompiling assets) --- config/environments/production.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index 4863b1d65..acd296ae2 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -12,7 +12,12 @@ Discourse::Application.configure do # Disable Rails's static asset server (Apache or nginx will already do this) config.serve_static_assets = GlobalSetting.serve_static_assets - config.assets.js_compressor = Uglifier.new(output: {max_line_len: 1024}) + if defined?(Uglifier) + config.assets.js_compressor = Uglifier.new(output: {max_line_len: 1024}) + else + config.assets.js_compressor = :uglifier + end + config.assets.css_compressor = :sass # stuff should be pre-compiled