到处都是零错误。红宝石/铁轨3

时间:2010-10-09 20:35:20

标签: ruby-on-rails ruby rubygems ruby-on-rails-3

我得到一个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] *

1 个答案:

答案 0 :(得分:1)

Phew刚刚发现了原因。我用String.mb_char.downcase对Sting.downcase进行了ovverriden,我认为它很好。谢谢ruby-debugger: - )