views:

54

answers:

0

i get rake migrate errors when trying to load a model in migration files that has paperclip associations like: has_attached_file

def self.up
  add_column :users, :events_count, :integer, :default => 0
  u = User.find(:first)
  u.update_attribute :events_count, u.events.length 
end

The User model has a paperclip association: "has_attached_file" and i´m getting a rake error: "you did not privde both required access keys" (aws keys for paperclip).

if i remove the "has_attached_file" line from the user model, all is fine.

this post describes the same problem: http://groups.google.com/group/paperclip-plugin/browse_thread/thread/615887e5258fd580

i have paperclip 2.3.1.1