0
我遇到錯誤未定義的方法`新'的回形針:模塊 運行時rake db:遷移到更新表的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
我使用回形針2.6.0,1.9.2紅寶石,導軌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'