1

ガードを使用して 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: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レベル) 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: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
4

2 に答える 2