我得到一个NoMethodError:nil的未定义方法`get_best_compatible':邮件中的NilClass
`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 'encoded' from /usr/lib/ruby/gems/1.8/gems/mail-2.2.7/lib/mail/message.rb:1672:in 'to_s'`
使用mail gem
时使用oauth gem时出现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
错误
即使我在项目中运行 rails g ,我也会 /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!
请注意,这些东西在几天前工作得很好,我不知道我是怎么设法弄乱这个糟糕的我的项目。 使用* ruby 1.8.7(2010-06-23 patchlevel 299)[x86_64-linux] *
答案 0 :(得分:1)