Paperclip / Right_AWS & Content_Type Issue #47

Closed
praveensharma opened this Issue Jun 22, 2009 · 4 comments

Projects

None yet

2 participants

@praveensharma

Hey there. I'm having a weird issue when trying to rake refresh paperclip after initally setting it up to use s3 storage. The following is the error:

undefined method `content_type' for #
/Users/praveen/Sites/percussionlab/vendor/plugins/paperclip/tasks/paperclip_tasks.rake:57
/Users/praveen/Sites/percussionlab/vendor/plugins/paperclip/tasks/paperclip_tasks.rake:26:in `for_all_attachments'
/Users/praveen/Sites/percussionlab/vendor/plugins/paperclip/tasks/paperclip_tasks.rake:24:in `each'
/Users/praveen/Sites/percussionlab/vendor/plugins/paperclip/tasks/paperclip_tasks.rake:24:in `for_all_attachments'
/Users/praveen/Sites/percussionlab/vendor/plugins/paperclip/tasks/paperclip_tasks.rake:22:in `each'
/Users/praveen/Sites/percussionlab/vendor/plugins/paperclip/tasks/paperclip_tasks.rake:22:

Could anyone lend a hand? I've upgraded Ruby to 1.8.7, Updated all Gems / Plugins, Tried using AWS/S3 gem instead of Right_AWS (doesn't work). I'm attempting to upload images and mp3s. Though the issue occurs even when I turn off the mp3 uploading...

@praveensharma

NOT SOLVED! It appears that when I updated my copy of paperclip to that branch, it breaks S3 uploads in a different way (ImageMagick 'identify' not found) - I believe that this is due to the changes in to_file.

Anyway - i'm still getting this error using the main branch of paperclip:

** Invoke paperclip:refresh (first_time)
** Invoke paperclip:refresh:metadata (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute paperclip:refresh:metadata
rake aborted!
undefined method `content_type' for #
/Users/praveen/Sites/percussionlab/vendor/plugins/paperclip/tasks/paperclip_tasks.rake:57
/Users/praveen/Sites/percussionlab/vendor/plugins/paperclip/tasks/paperclip_tasks.rake:26:in `for_all_attachments'
/Users/praveen/Sites/percussionlab/vendor/plugins/paperclip/tasks/paperclip_tasks.rake:24:in `each'
/Users/praveen/Sites/percussionlab/vendor/plugins/paperclip/tasks/paperclip_tasks.rake:24:in `for_all_attachments'
/Users/praveen/Sites/percussionlab/vendor/plugins/paperclip/tasks/paperclip_tasks.rake:22:in `each'
/Users/praveen/Sites/percussionlab/vendor/plugins/paperclip/tasks/paperclip_tasks.rake:22:in `for_all_attachments'
/Users/praveen/Sites/percussionlab/vendor/plugins/paperclip/tasks/paperclip_tasks.rake:54
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31
/usr/local/bin/rake:19:in `load'
/usr/local/bin/rake:19
@qrush
qrush commented Jun 25, 2009

I haven't seen this before...also, you're better off asking general questions on the mailing list or at least searching through it to see if anyone else has run into this.

http://groups.google.com/group/paperclip-plugin

Also, I wrapped your errors in a pre tag so GitHub wouldn't muck it up.

@praveensharma

Thanks for the link to the google group! Closing this issue as I've posted a possible solution in another thread.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment