One thought:  Have you migrated your DB?

heroku rake db:migrate
heroku restart

-Kelly



On Aug 26, 2010, at 7:57 PM, eksatx wrote:

Setting up paperclip with S3 in my linux dev environment was a snap --
everything works out of the box. However, I can't get it to work on
Heroku.

When I try to do an upload, the log shows:

Processing ItemsController#create (for 72.177.97.9 at 2010-08-26
16:35:14) [POST]
 Parameters: {"commit"=>"Create",
"authenticity_token"=>"0Hy3qvQBHE1gvFVaq32HMy2ZIopelV0BHbrSeHkO1Qw=",
"item"=>{"photo"=>#<File:/home/slugs/270862_4aa601b_4b6f/mnt/tmp/
RackMultipart20100826-6286-1256pvc-0>, "price"=>"342", "name"=>"a new
item", "description"=>"a new item", "sold"=>"0"}}

Paperclip::PaperclipError (Item model missing required attr_accessor
for 'photo_file_name'):

I found one blog post that referenced this error, and it said to add
this to my model:

attr_accessor :photo_file_name
attr_accessor :photo_content_type
attr_accessor :photo_file_size
attr_accessor :photo_updated_at

That does indeed make the model missing required attr_accessor for
'photo_file_name' error go away, but it still doesn't work. See my
other question for details (http://groups.google.com/group/heroku/
browse_thread/thread/a724fa6bed6d9f9d). As I have figured out that
with the attr_accessor lines added to my model the uploads fail even
on my dev system, I suspect that is not the right answer.

-- You received this message because you are subscribed to the Google Groups "Heroku" group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to heroku+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/heroku?hl=en .


--
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to her...@googlegroups.com.
To unsubscribe from this group, send email to 
heroku+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.

Reply via email to