ガードを使用して JavaScript を醜くしようとしていますが、次のエラーが発生します。
エラー - Guard::Uglify はその を達成できませんでした。例外は次のとおりです: [#] JSON::GeneratorError: JSON オブジェクトまたは配列の生成のみが許可されました [#] 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レベル) 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:tap' [#] C:/Ruby193/lib/ruby/gems/1.9.1/gems/execjs-2.0.0/lib/execjs/external_runtime.rb:47:in
コンパイル中'
私はjson 2.0.0(1.8.0でも試しました)とmutli-json 1.7.8(1.7.9でも試しました)を使用しています
編集
Guardfile からのコード
guard 'uglify', :destination_file => "js/scripts.min.js" do
watch 'js/scripts.min.js'
end