I'm using Ruby 1.9 and Rails 2.3.4 with Paperclip gem to save attachments. and I followed tutorial by adding the proper migration, adding (has_attached_file :video) to the model, making the form (multipart) and adding <%= f.file_field :video %> to it...

When I try to upload a file I look in the log and I see:

[paperclip] Saving attachments.

But the file isn't really uploaded and the extra fields that have been added by paperclip are all NULLs!!

The fact that it's not throwing any error making me confused where to start looking for possible issues. I'm using MAC OSX Leopard, is it possible that it's a permissions thing? if so how can I give "sudo" permission to my app?

Any ideas what the problem is or how I can display better logging to know where to look for problems.

Thanks for this. I've spent way too many hours trying to figure this out. I also tested this with attr_accessor and that did not work, has to be attr_accessible
–
Misha MMar 24 '11 at 23:40

If I could give you a kiss I would! Such a silly little thing to miss, but it made a huge difference. Annoying that there is no warning as you would get for other attributes...
–
James P McGrathNov 28 '11 at 10:42

3

I have the exact same issue, but adding attr_accessible does not solve it. Still inserting 'nil' for the 4 attributes. Any idea?
–
Yohann T.May 12 '12 at 19:05