MacOS Leopard 上安装 ImageMagick 和RMagick

Step 1: Install MacPorts

Go to the Installing MacPorts web page and follow the instructions there to install MacPorts. Note that you must install the XCode Tools, X11.app, and the X11 SDK.

The remainder of these instructions assume that you installed MacPorts using all the defaults.

Step 2: Install ImageMagick and its delegate libraries

If you have not already done so, start the Terminal application.

Enter this command in a Terminal window.

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

You'll be prompted for your password. Be patient. Depending on your Internet access speed and the speed of your CPU this could take an hour or more.

This command installs support for JPEG, TIFF, WMF, PDF, and PNG images, and for Postscript and TrueType fonts.

Step 3: Install RMagick

Enter this command in a Terminal window.

sudo gem install rmagick

Again, you'll be prompted for your password. You'll see this output:

Bulk updating Gem source index for: http://gems.rubyforge.org
Building native extensions.  This could take a while...
Successfully installed rmagick-X.Y.Z
Be patient. A lot of time will pass with no output from the gem command. The "Successfully installed" message does not mean that RMagick was successfully installed. The RMagick installation can encounter error conditions that gem can't detect. The following irb session is a better indicator of a successful install. (Of course the version numbers in the message may vary from what is shown here, depending on what versions of the software are currently available.)

$ 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

If you're using the version of Ruby that comes with Leopard, the RMagick HTML documentation is automatically installed at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/share/RMagick/index.html. If you're using your own installation of Ruby, the RMagick HTML documentation is automatically installed at $PREFIX/share/RMagick/index.html.

你可能感兴趣的:(Web,xcode,bash,Ruby,rubygems)