2008年4月14日星期一

Install RMagick

  1. grab the ImageMagick.tar.gz:
    wget ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz
  2. Unarchive it:
    tar xvzf ImageMagick.tar.gz
  3. install ImageMagick
    cd ImageMagick-6.3.8 "Or whichever the current version is, of course."
    ./configure
    make (wait~~~)
    sudo make install
  4. download rmagick-2.2.2.gem:
    wget http://files.rubyforge.mmmultiworks.com/rmagick/rmagick-2.2.2.gem
  5. install rmagick:
    sudo gem install rmagick-2.2.2.gem
  6. (see http://rmagick.rubyforge.org/install-faq.html, search "libMagickWand.so.1"):
    add this line "export LD_LIBRARY_PATH=/usr/local/lib" to ~/.bashrc
  7. test
    ruby -rubygems -e "require 'RMagick'; puts Magick::Long_version;"
    irb -rubygems -r RMagick

ref: http://zzhang.javaeye.com/blog/162994

没有评论: