耙资产:预编译问题。解析错误

时间:2013-02-08 14:15:00

标签: ruby-on-rails deployment

我遇到问题,同时在生产环境中预编译资产

AssetSync: using default configuration from built-in initializer
rake aborted!
Caught Encoding::CompatibilityError at '["ok","/*!\n * jQuery': incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string)
  (in /home/rails_work/bunk1_dev/app/assets/javascripts/active_admin.js)
/usr/local/rvm/gems/ruby-1.9.3-p194@bunk1/gems/json_pure-1.7.6/lib/json/pure/parser.rb:242:in `rescue in parse_string'
/usr/local/rvm/gems/ruby-1.9.3-p194@bunk1/gems/json_pure-1.7.6/lib/json/pure/parser.rb:213:in `parse_string'
/usr/local/rvm/gems/ruby-1.9.3-p194@bunk1/gems/json_pure-1.7.6/lib/json/pure/parser.rb:257:in `parse_value'
/usr/local/rvm/gems/ruby-1.9.3-p194@bunk1/gems/json_pure-1.7.6/lib/json/pure/parser.rb:121:in `parse'
/usr/local/rvm/gems/ruby-1.9.3-p194@bunk1/gems/json_pure-1.7.6/lib/json/common.rb:155:in `parse`

任何帮助将不胜感激

1 个答案:

答案 0 :(得分:0)

我已经解决了这个问题,这个问题与json_pure gem预编译有关。只需从代码中删除“require'json / pure'”并应用“require'json'”。希望答案会有所帮助。

由于