ArgumentError:冗余的UTF-8序列

时间:2013-06-17 13:14:50

标签: ruby-on-rails ruby utf-8

您好我无法确定实际问题是什么。我使用rails 2.3.18和ruby 1.8.7 错误的堆栈跟踪如下

  …tivesupport-2.3.18/lib/active_support/json/encoding.rb:  68:in `unpack'
…tivesupport-2.3.18/lib/active_support/json/encoding.rb:  68:in `escape'
…tivesupport-2.3.18/lib/active_support/json/encoding.rb:  63:in `gsub'
…tivesupport-2.3.18/lib/active_support/json/encoding.rb:  63:in `escape'
…port-2.3.18/lib/active_support/json/encoders/string.rb:   3:in `to_json'
…tivesupport-2.3.18/lib/active_support/json/encoding.rb:  79:in `encode'
…tivesupport-2.3.18/lib/active_support/json/encoding.rb:  18:in `__send__'
…tivesupport-2.3.18/lib/active_support/json/encoding.rb:  18:in `encode'
…-2.3.18/lib/active_support/json/encoders/enumerable.rb:  11:in `to_json'
…-2.3.18/lib/active_support/json/encoders/enumerable.rb:  11:in `map'
…-2.3.18/lib/active_support/json/encoders/enumerable.rb:  11:in `to_json'
…tivesupport-2.3.18/lib/active_support/json/encoding.rb:  79:in `encode'
…tivesupport-2.3.18/lib/active_support/json/encoding.rb:  18:in `__send__'
…tivesupport-2.3.18/lib/active_support/json/encoding.rb:  18:in `encode'
…port-2.3.18/lib/active_support/json/encoders/object.rb:   4:in `to_json'
…tivesupport-2.3.18/lib/active_support/json/encoding.rb:  79:in `encode'
…tivesupport-2.3.18/lib/active_support/json/encoding.rb:  18:in `__send__'
…tivesupport-2.3.18/lib/active_support/json/encoding.rb:  18:in `encode'
…-2.3.18/lib/active_support/json/encoders/enumerable.rb:  11:in `to_json'
…-2.3.18/lib/active_support/json/encoders/enumerable.rb:  11:in `map'
…-2.3.18/lib/active_support/json/encoders/enumerable.rb:  11:in `to_json'
…tivesupport-2.3.18/lib/active_support/json/encoding.rb:  79:in `encode'
…tivesupport-2.3.18/lib/active_support/json/encoding.rb:  18:in `__send__'
…tivesupport-2.3.18/lib/active_support/json/encoding.rb:  18:in `encode'
…upport-2.3.18/lib/active_support/json/encoders/hash.rb:  38:in `to_json'
…s/activesupport-2.3.18/lib/active_support/rescuable.rb:  95:in `map'
…upport-2.3.18/lib/active_support/json/encoders/hash.rb:  37:in `each'
…upport-2.3.18/lib/active_support/json/encoders/hash.rb:  37:in `map'
…upport-2.3.18/lib/active_support/json/encoders/hash.rb:  37:in `to_json'
…tivesupport-2.3.18/lib/active_support/json/encoding.rb:  79:in `encode'
…tivesupport-2.3.18/lib/active_support/json/encoding.rb:  18:in `__send__'
…tivesupport-2.3.18/lib/active_support/json/encoding.rb:  18:in `encode'
…port-2.3.18/lib/active_support/json/encoders/object.rb:   4:in `to_json'
…tivesupport-2.3.18/lib/active_support/json/encoding.rb:  79:in `encode'
…tivesupport-2.3.18/lib/active_support/json/encoding.rb:  18:in `__send__'
…tivesupport-2.3.18/lib/active_support/json/encoding.rb:  18:in `encode'
…upport-2.3.18/lib/active_support/json/encoders/hash.rb:  38:in `to_json'
…s/activesupport-2.3.18/lib/active_support/rescuable.rb:  95:in `map'
…upport-2.3.18/lib/active_support/json/encoders/hash.rb:  37:in `each'
…upport-2.3.18/lib/active_support/json/encoders/hash.rb:  37:in `map'
…upport-2.3.18/lib/active_support/json/encoders/hash.rb:  37:in `to_json'

我不知道如何重现此错误。

Ruby Rails, jQuery, Uploadify - weird UTF-8 error告诉我如何解决这个问题,任何人都可以解释什么是问题以及如何重现这个问题?

0 个答案:

没有答案