我得到这个错误,Paperclip宝石。如何调试宝石中的错误?
NoMethodError (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.size):
paperclip (2.3.8) lib/paperclip/attachment.rb:104:in `assign'
我该如何进行调试,看起来好像是在宝石中一样?如果这是我的代码,我会放几个puts
看看发生了什么,但我不能这样做。我正在使用Rails 3.0.1
问题可能是因为你通过零回形针。你是否检查过堆栈跟踪,你可以在这里发布? – 2011-02-18 13:38:49