我是用 mysql 的，请问这两个 gem 各有什么特点？网上对比的文章好少啊
没有仔细研究，提供个排名供参考：https://www.ruby-toolbox.com/categories/rails_file_uploads Paperclip 领先。
我用的是 Carrierwave，因为能用 mongoid。
I have used CarrierWave and after some hours of frustration I'm switching to Paperclip.
Here are the problems I have seen with CarrierWave:
- You can't validate file size. There is a wiki article that explains how to do it, but it does not work.
- Integrity validations do not work when using MiniMagick (very convenient if you are concerned about RAM usage). You can upload a corrupted image file and CarrierWave will throw an error at first, but the next time will swallow it.
- You can't delete the original file. You can instead resize it, compress, etc. There is a wiki article explaining how to do it, but again it does not work.
- It depends on external libraries such as RMagick or MiniMagick. Paperclip works directly with the convert command line (ImageMagick). So, if you have problems with Minimagick (I had), you will lose hours diving in Google searches. Both RMagick and Minimagick are abandoned at the time of this writing (I contacted the author of Minimagic, no response).
- It needs some configuration files. This is seen as an advantage, but I don't like having single configuration files around my project just for one gem. Configuration in the model seems more natural to me. This is a matter of personal taste anyway.
- If you find some bug and report it, the dev team is really absent and busy. They will tell you to fix bugs yourself. It seems like a personal project that is improved in spare time. For me it's not valid for a professional project with deadlines.
- filesize 可以在反向代理层进行 validate
- 对 mini_magick 这方面不太清楚，早期读使用 paperclip 的 proj 依赖 rmagic 的也不少貌似
- carrierwave 把 uploader 独立天然的 dry 了，而 paperclip 还需要通过 concern 方式手动去做一些
所以，我觉得是两个完全不同的设计思路，各有优劣，看情况去使用就好，carrierwave 因为有 uploader 类，所以我可以在这个层面对一些内部的东西做 hack，效果也还可以