mac安装rmagic

后面的太老了
更新2013/7/23
ubuntu:
Ubuntu 12.10
sudo apt-get install libmagick++4 libmagick++-dev


mac

brew install imagemagick     # will take a while!
gem install rmagick



—————————————————历史的小分割—————————————————————————

[url=http://rmagick.rubyforge.org/install-faq.html] Installing MacPorts[/url]
[url]http://trac.macports.org/wiki/InstallingMacPorts[/url]
这个就是运行的时间长


第二步

sudo port install tiff -macosx imagemagick +q8 +gs +wmf



第三步

sudo gem install rmagick



检查


$ irb -rubygems -r RMagick
irb(main):001:0> puts Magick::Long_version
This is RMagick 1.15.3 ($Date: 2007/01/20 15:45:29 $) Copyright (C) 2007 by Timothy P. Hunter
Built with ImageMagick 6.3.2 02/23/07 Q8 http://www.imagemagick.org
Built for ruby 1.8.5 (2006-12-25 patchlevel 12) [powerpc-darwin8.0.0]
Web page: http://rmagick.rubyforge.org
Email: [email protected]
=> nil


检查安装情况

port contents ImageMagick



出现问题

Can’t find Magick-config
[quote]
checking for Ruby version >= 1.8.2... yes
checking for gcc... yes
checking for Magick-config... no
Can't install RMagick 2.9.1. Can't find Magick-config in .....
[/quote]

ubuntu的话可能是没有装
apt-get install libmagick9-dev


mac的话也可以检查一下path

附带的加上,ubuntu的安装



$ sudo aptitude install -y imagemagick
$ sudo aptitude install -y libmagick9-dev
$ sudo gem install rmagick

#新版ubuntu12.10等用

aptitude install build-essential imagemagick libmagickcore-dev libmagickwand-dev
gem install rmagick


检查


$ sudo irb -rubygems -r RMagick
irb(main):001:0> puts Magick::Long_version
This is RMagick 2.10.0 ($Date: 2009/06/19 22:07:05 $) Copyright (C) 2009 by Timothy P. Hunter
Built with ImageMagick 6.4.5 2009-06-04 Q16 OpenMP http://www.imagemagick.org
Built for ruby 1.8.7
Web page: http://rmagick.rubyforge.org
Email: [email protected]
=> nil

你可能感兴趣的:(RubyOnRails)