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:ingenerate' [#] c:/ruby193/lib/ruby/1.9.1/json/common.rb:352:in dump' [#] c:/ruby193/lib/ruby/gems/1.9.1/gems/execjs-2.0.0/lib/execjs/external_runtime.rb:53:inblock (2 levels) in compile' [#] c:/ruby193/lib/ruby/gems/1.9.1/gems/execjs-2.0.0/lib/execjs/external_runtime.rb:51:in sub!' [#] c:/ruby193/lib/ruby/gems/1.9.1/gems/execjs-2.0.0/lib/execjs/external_runtime.rb:51:inblock in compile' [#] c:/ruby193/lib/ruby/gems/1.9.1/gems/execjs-2.0.0/lib/execjs/external_runtime.rb:47:in tap' [#] c:/ruby193/lib/ruby/gems/1.9.1/gems/execjs-2.0.0/lib/execjs/external_runtime.rb:47:incompile'

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

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -