I get a NoMethodError: undefined method `get_best_compatible' for nil:NilClass in mail
`from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.0/lib/active_support/whiny_nil.rb:48:in 'method_missing'from /usr/lib/ruby/gems/1.8/gems/mail-2.2.7/lib/mail/body.rb:143:in 'get_best_encoding' from /usr/lib/ruby/gems/1.8/gems/mail2.2.7/lib/mail/message.rb:1830:in 'identify_and_set_transfer_encoding' from /usr/lib/ruby/gems/1.8/gems/mail-2.2.7/lib/mail/message.rb:1646:in 'ready_to_send!' from /usr/lib/ruby/gems/1.8/gems/mail 2.2.7/lib/mail/message.rb:1664:in 'enco开发者_如何学运维ded' from /usr/lib/ruby/gems/1.8/gems/mail-2.2.7/lib/mail/message.rb:1672:in 'to_s'`
when using the mail gem
I get a You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.split
error when using the oauth gem
and even when I am running rails g in my project I am getting /usr/lib/ruby/gems/1.8/gems/railties-3.0.0/lib/rails/generators.rb:232:in 'help': You have a nil object when you didn't expect it! (NoMethodError)
You might have expected an instance of Array.
The error occurred while evaluating nil.map!
Note that these stuff worked perfectly a few days ago and I have no idea how I managed to mess up this bad my project. Using *ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux]*
Phew just found out why. I have ovverriden the Sting.downcase with String.mb_char.downcase and I thought it was fine. Thanks ruby-debugger :-)
精彩评论