1

从 Rails 2.3.11 升级到 3.1 时,我的应用程序出现了一些意外行为,尤其是与 Paperclip 相关的情况。

我已将 gem 'paperclip' 添加到我的 Gemfile 中,然后我跑了bundle install,一切似乎都很顺利,除了当我启动我的服务器时,我得到了这个堆栈跟踪

...: `method_missing': undefined local variable or method `has_attached_file' for #<Class:0x7f30b32c1f88> (NameError)
...
...
from /home/user/railscamp/app/app/models/organization.rb:76
...
from /home/user/railscamp/app/config.ru:1:in `new'
from /home/user/railscamp/app/config.ru:1

有什么想法吗?

4

1 回答 1

1

将这些添加到您的模型中

attr_accessor :image_file_name, :image_content_type, :image_file_size, :image_updated_at
于 2011-07-09T13:50:15.610 回答