jacquescrocker / jammit-s3

Extensions so you can use jammit with s3/cloudfront for your Rails app
http://documentcloud.github.com/jammit/
MIT License
125 stars 31 forks source link

jammit-s3 does not play nice with paperclip when storage is set to s3 #14

Open jspillers opened 13 years ago

jspillers commented 13 years ago

Paperclip uses the aws-s3 gem to handle image uploads to your bucket. Jammit-s3 apparently uses a different gem that does not get along with aws-s3... i think they share some similar namespaces and are colliding.

specifically i am getting this error when i try to upload a file:

NoMethodError (undefined method `exists?' for AWS::S3::S3Object:Class)

Would be awesome if these two gems could co-exist as I definitely have need for both.

kmamykin commented 13 years ago

I dont know how others have solved this issue, may be there is a better solution, but I had to migrate jammit-s3 gem to use aws-s3 gem. There is already a fork by someone.

simonoff commented 13 years ago

Why? s3 gem works fine. Use https://github.com/qoobaa/s3/blob/master/extra/s3_paperclip.rb file for support S3 storage. Just now I'm working on invalidation support for s3_paperclip.rb.

kmamykin commented 13 years ago

Ah, admittedly I did not put much time into researching the issue. s3_paperclip might have solved it.

jaredmoody commented 13 years ago

So the solution for this is to monkey patch paperclip? I'd rather not . . .

simonoff commented 13 years ago

For me it's the best way. Why I need depend my app on two modules with the same functionality?