ruby - Guard-Uglify throws "only generation of JSON objects or arrays allowed" -
i'm trying uglify javascript using guard following errors:
error - guard::uglify failed achieve , exception was: [#] json::generatorerror: generation of json objects or arrays allowed [#] c:/ruby193/lib/ruby/1.9.1/json/common.rb:216:in
generate' [#] c:/ruby193/lib/ruby/1.9.1/json/common.rb:216:in
generate' [#] c:/ruby193/lib/ruby/1.9.1/json/common.rb:352:indump' [#] c:/ruby193/lib/ruby/gems/1.9.1/gems/execjs-2.0.0/lib/execjs/external_runtime.rb:53:in
block (2 levels) in compile' [#] c:/ruby193/lib/ruby/gems/1.9.1/gems/execjs-2.0.0/lib/execjs/external_runtime.rb:51:insub!' [#] c:/ruby193/lib/ruby/gems/1.9.1/gems/execjs-2.0.0/lib/execjs/external_runtime.rb:51:in
block in compile' [#] c:/ruby193/lib/ruby/gems/1.9.1/gems/execjs-2.0.0/lib/execjs/external_runtime.rb:47:intap' [#] c:/ruby193/lib/ruby/gems/1.9.1/gems/execjs-2.0.0/lib/execjs/external_runtime.rb:47:in
compile'
i'm using json 2.0.0(also tried 1.8.0) , mutli-json 1.7.8(also tried 1.7.9)
edit
code guardfile
guard 'uglify', :destination_file => "js/scripts.min.js" watch 'js/scripts.min.js' end
this should linked javascript code not being formatted correctly.
if have no clue of error may be, try uglify parts of code separately until find 1 throws error.
Comments
Post a Comment