I'm very confused here as to why paperclip isn't working for me.
When accessing a previously saved file on s3 for processing this method of the paperclip s3 storage class causes an error:
def to_file style = default_style
return @queued_for_write[style] if @queued_for_write[style]
filename = path(style).split(".")
extname = File.extname(filename)
What is happening is the path is being split into an array which then isn't accepted by File.extname which returns the error "can't convert Array into String".
I'd really appreciate some advice on this; maybe my path is wrong but I cannot see how split is going to return anything but the array which causes an error on File.extname. This works fine in development but not on heroku where it worked previous to last weekend.
Thank in advance.
EDIT
Have added a weighty bounty on this which reflects my ongoing frustration. Really if someone can help me troubleshoot this I'd be incredibly grateful. I've ruled out previous doubts I had, that maybe it was the heroku repository, by freshly installing the app again.
All pertinent code as far as I can tell:
#photo.rb
has_attached_file :photo,
:styles => {
:list => "150x100#",
:article => "264>x210",
:large => "558>x380",
:original => "1024>x768"
},
:storage => :s3,
:s3_credentials => "#{RAILS_ROOT}/config/s3.yml",
:url => ":s3_alias_url",
:s3_host_alias => "files.mydomain.com", #s3 bucket with dns cname record to subdomain
:path => "/photos/:hashed_path/:style/:id.:extension"
#config/s3.rb
bucket: files.mydomain.com
access_key_id: *******************
secret_access_key: **********************************