sstephenson / ruby-yui-compressor

A Ruby interface to YUI Compressor for minifying JavaScript and CSS assets.
217 stars 57 forks source link

Error on "RAILS_ENV=production bundle exec rake assets:precompile" command #39

Closed xcopy closed 10 years ago

xcopy commented 10 years ago
[ERROR] in /tmp/yui_compress20140221-17020-36ltx2
  19297:14:invalid property id
[ERROR] in /tmp/yui_compress20140221-17020-36ltx2
  19297:15:syntax error
[ERROR] in /tmp/yui_compress20140221-17020-36ltx2
  19298:8:syntax error
[ERROR] in /tmp/yui_compress20140221-17020-36ltx2
  1:0:Compilation produced 3 syntax errors.
org.mozilla.javascript.EvaluatorException: Compilation produced 3 syntax errors.
    at com.yahoo.platform.yui.compressor.YUICompressor$1.runtimeError(YUICompressor.java:172)
    at org.mozilla.javascript.Parser.parse(Parser.java:396)
    at org.mozilla.javascript.Parser.parse(Parser.java:340)
    at com.yahoo.platform.yui.compressor.JavaScriptCompressor.parse(JavaScriptCompressor.java:315)
    at com.yahoo.platform.yui.compressor.JavaScriptCompressor.<init>(JavaScriptCompressor.java:536)
    at com.yahoo.platform.yui.compressor.YUICompressor.main(YUICompressor.java:147)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at com.yahoo.platform.yui.compressor.Bootstrap.main(Bootstrap.java:21)
rake aborted!
Command 'java -jar /var/lib/gems/1.9.1/gems/yui-compressor-0.12.0/lib/yui/../yuicompressor-2.4.8.jar --type js --charset utf-8 --nomunge /tmp/yui_compress20140221-17020-36ltx2' returned non-zero exit status
  (in /home/kairat/rails_apps/motors/app/assets/javascripts/active_admin/active_admin.js.coffee)
/var/lib/gems/1.9.1/gems/yui-compressor-0.12.0/lib/yui/compressor.rb:106:in `block in compress'
/var/lib/gems/1.9.1/gems/yui-compressor-0.12.0/lib/yui/compressor.rb:141:in `streamify'
/var/lib/gems/1.9.1/gems/yui-compressor-0.12.0/lib/yui/compressor.rb:86:in `compress'
/var/lib/gems/1.9.1/gems/sprockets-2.11.0/lib/sprockets/yui_compressor.rb:19:in `evaluate'
/var/lib/gems/1.9.1/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
/var/lib/gems/1.9.1/gems/sprockets-2.11.0/lib/sprockets/context.rb:197:in `block in evaluate'
/var/lib/gems/1.9.1/gems/sprockets-2.11.0/lib/sprockets/context.rb:194:in `each'
/var/lib/gems/1.9.1/gems/sprockets-2.11.0/lib/sprockets/context.rb:194:in `evaluate'
/var/lib/gems/1.9.1/gems/sprockets-2.11.0/lib/sprockets/bundled_asset.rb:25:in `initialize'
/var/lib/gems/1.9.1/gems/sprockets-2.11.0/lib/sprockets/base.rb:377:in `new'
/var/lib/gems/1.9.1/gems/sprockets-2.11.0/lib/sprockets/base.rb:377:in `build_asset'
/var/lib/gems/1.9.1/gems/sprockets-2.11.0/lib/sprockets/index.rb:94:in `block in build_asset'
/var/lib/gems/1.9.1/gems/sprockets-2.11.0/lib/sprockets/caching.rb:58:in `cache_asset'
/var/lib/gems/1.9.1/gems/sprockets-2.11.0/lib/sprockets/index.rb:93:in `build_asset'
/var/lib/gems/1.9.1/gems/sprockets-2.11.0/lib/sprockets/base.rb:287:in `find_asset'
/var/lib/gems/1.9.1/gems/sprockets-2.11.0/lib/sprockets/index.rb:61:in `find_asset'
/var/lib/gems/1.9.1/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:211:in `block in find_asset'
/var/lib/gems/1.9.1/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:257:in `benchmark'
/var/lib/gems/1.9.1/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:210:in `find_asset'
/var/lib/gems/1.9.1/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:119:in `block in compile'
/var/lib/gems/1.9.1/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:118:in `each'
/var/lib/gems/1.9.1/gems/sprockets-2.11.0/lib/sprockets/manifest.rb:118:in `compile'
/var/lib/gems/1.9.1/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:60:in `block (3 levels) in define'
/var/lib/gems/1.9.1/gems/sprockets-2.11.0/lib/rake/sprocketstask.rb:146:in `with_logger'
/var/lib/gems/1.9.1/gems/sprockets-rails-2.0.1/lib/sprockets/rails/task.rb:59:in `block (2 levels) in define'
/var/lib/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:236:in `call'
/var/lib/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:236:in `block in execute'
/var/lib/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:231:in `each'
/var/lib/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:231:in `execute'
/var/lib/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:175:in `block in invoke_with_call_chain'
/usr/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
/var/lib/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:168:in `invoke_with_call_chain'
/var/lib/gems/1.9.1/gems/rake-10.1.1/lib/rake/task.rb:161:in `invoke'
/var/lib/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:149:in `invoke_task'
/var/lib/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/var/lib/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:106:in `each'
/var/lib/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:106:in `block in top_level'
/var/lib/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:115:in `run_with_threads'
/var/lib/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:100:in `top_level'
/var/lib/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:78:in `block in run'
/var/lib/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:165:in `standard_exception_handling'
/var/lib/gems/1.9.1/gems/rake-10.1.1/lib/rake/application.rb:75:in `run'
/var/lib/gems/1.9.1/gems/rake-10.1.1/bin/rake:33:in `<top (required)>'
/usr/local/bin/rake:23:in `load'
/usr/local/bin/rake:23:in `<main>'
xcopy commented 10 years ago

Sorry, it'a a Active Admin javascript bug.

betesh commented 9 years ago

@xcopy I just started seeing a similar issue today. Can you link to the AA issue here? (I know it's been a while but I'm hoping you'll remember what it was)

betesh commented 9 years ago

Found it: https://github.com/activeadmin/activeadmin/issues/2960

betesh commented 9 years ago

Thanks, helped me pinpoint the same problem in another JS library, though it seems I'm not the first to spot it: https://github.com/stevenwanderski/bxslider-4/pull/45/files

xcopy commented 9 years ago

@betesh :+1: