I'm using carrierwave gem ( ver. 0.8.0 ). When I make 'rake db:migrate', I see strange error:
== 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
My migration:
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
How can I solve it?