views:

58

answers:

1

OK so I'm looking for a good image uploading gem that is Rails 3 compatible and has no dependencies. I was using attachment_fu, but it's Rails 3 compatibility seems to be in question. And I really wanted to use Paperclip, but it has an image majick dependency. I'm having a hard time finding other alternatives...

Stupid question #1: Shouldnt Rails have some "official" image uploading scheme thats baked into the framework? Every web app will need it at some point, and hunting around every time for some questionable third-party way of doing this gets old after awhile.

Stupid question #2: Why can't Paperclip have a no-dependency mode that doesnt make thumbnails or resize, and just stores images as they are uploaded?

+1  A: 

As someone who has Rails with Paperclip running on both Linux, Mac and Windows, I can tell you: installing ImageMagic (or whatever spelling is) is not a problem.

In fact, my old linux hosting already had it, Mac laptop, IIRC, too. I expected some problems installing it on windows, but had to just download installer and specify correct path in rails. No problem whatsoever.

So, in your place, I would really give it a try.

edit
There's also a number of file upload plugins for Rails, but I didn't use them and can't really give advice there. Google will give you examples.

Nikita Rybak
Yes, I know ImageMajick is not hard to install, but that is not the point. I don't need any image processing, I just want basic file/image uploading. Also, I don't want to use plugins with Rails 3, I want a gem!
Buddy
@Buddy If you don't want image processing, don't define any custom styles. That's all. Also, you can use paperclip as a gem: it's not in my "vendor/plugins" folder. I just do "config.gem ..." in my environment.rb and use it.
Nikita Rybak
Oh yes that works! Thanks for pointing that out - I'm an idiot sometimes. So, to use Paperclip without ImageMajick just don't add any styles in the model. I overlooked this and I didn't see it mentioned anywhere in the Paperclip docs. In fact, at the very beginning of the docs, they explicitly make it sound like Image Majick is REQUIRED in order to use Paperclip at all....
Buddy