Carrierwave gem ( ver. 0.8.0 ) を使用しています。「rake db:migrate」を作成すると、奇妙なエラーが表示されます。
== AddAttachmentLogoToMerchants: migrating ===================================
-- change_table(:merchants)
rake aborted!
An error has occurred, this and all later migrations canceled:
undefined method `attachment' for ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::Table:0x007f900e6bde88
私の移行:
def self.up
change_table :merchants do |t|
t.attachment :logo
end
remove_column :merchants, :logo_filename
end
def self.down
add_column :merchants, :logo_filename, :string
drop_attached_file :merchants, :logo
end
どうすれば解決できますか?