NameError (uninitialized constant REXML::Encoding::BINARY) 错误

Friday, July 30, 2010

A NameError occurred in daily_actions#get_action_property:

uninitialized constant REXML::Encoding::BINARY
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:440:in `load_missing_constant'
.....
-------------------------------
Backtrace:
-------------------------------

/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:440:in `load_missing_constant'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoding.rb:53:in `escape'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoders/string.rb:3:in `to_json'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoding.rb:70:in `encode'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoding.rb:18:in `__send__'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/json/encoding.rb:18:in `encode'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_view/helpers/prototype_helper.rb:1000:in `javascript_object_for'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_view/helpers/prototype_helper.rb:1005:in `arguments_for_call'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_view/helpers/prototype_helper.rb:1005:in `map'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_view/helpers/prototype_helper.rb:1005:in `arguments_for_call'
/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.3.5/lib/action_view/helpers/prototype_helper.rb:901:in `call'
[RAILS_ROOT]/vendor/plugins/jrails/lib/jrails.rb:79:in `insert_html'
[RAILS_ROOT]/app/controllers/ajax_controller.rb:73

然后我打开encoding.rb这个文件看了下,
把BINARY换成了UTF_8就正常了, 但是不知道为什么 :-p

============update=====================
是否安装了gimite-google-spreadsheet-ruby这个插件, 如果是的话把它删了重装一下 gem sources -a
http://gemcutter.org sudo gem install google-spreadsheet-ruby 这样问题就解决了

This entry was tagged Rails

comments powered by Disqus

© 2009-2013 lxneng.com. All rights reserved. Powered by Pyramid

go to Top