Rails Carrierwave JQuery File Upload

一直想做一个基于Ajax上传图片功能,网上找到一个Jquery File Upload。以及基于Rails Carrierwave的DemoRails-Carrierwave-Jquery-File-Upload。

参考它的README.md clone并配置环境。在bundle install 安装rmagick时报错:

Installing rmagick (2.13.1) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

原因是rmagick需要本地library支持:libxml2-dev libxslt1-dev imagemagick libmagickwand-dev

apt-get install libxml2-dev libxslt1-dev imagemagick libmagickwand-dev


参考:

http://blueimp.github.io/jQuery-File-Upload/

https://github.com/n0ne/Rails-Carrierwave-jQuery-File-Upload

http://stackoverflow.com/questions/9407273/error-installing-rmagick-gem-on-osx-error-failed-to-build-gem-native-extensiosudo 

你可能感兴趣的:(rails,on,ruby)