我遇到Paperclip:Module 错误未定义方法`new' 运行rake db:migrate to update table for PaperClip。
此处为迁移类
class ForPaperclip < ActiveRecord::Migration
def self.up
change_table :photos do |t|
t.has_attached_file :shot
end
end
def self.down
drop_attached_file :photos, :shot
end
end
我使用的是paperclip 2.6.0,ruby 1.9.2,rails 3.1.0 有什么想法吗?
下面是错误堆栈。
/Users/Sa/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/lib/active_record/migration.rb:517:in `load_migration'
/Users/Sa/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/lib/active_record/migration.rb:512:in `migration'
/Users/Sa/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/lib/active_record/migration.rb:509:in `rescue in migrate'
/Users/Sa/.rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.1.0/lib/active_record/migration.rb:507:in `migrate'
答案 0 :(得分:0)