开发者

Problem w/ Paperclip, MacPorts, ImageMagick & Snow Leopard

I'm attempting to use ImageMagick along w/ Paperclip to handle the images on my rails app. The problem is whenever I try to upload an image I get the following in the terminal:

[paperclip] An error was received while processing: #<Paperclip::NotIdentifiedByImageMagickError: /var/folders/go/goZ833AaFaqyvv5RnLqQmE+++TM/-Tmp-/stream20110107-6356-1xfs9j1-0.jpg is not recognized by the 'identify' command.>

I have added the following to my environments/development.rb file:

Paperclip.options[:command_path] = "/usr/local/bin"

If I try to interact w/ ImageMagick in the terminal by using "convert" or something similar I get:

dyld: Library not loaded: /opt/local/lib/libltdl.7.dylib
  Referenced from: /usr/local/bin/convert
  Reason: Inco开发者_运维技巧mpatible library version: convert requires version 10.0.0 or later, but libltdl.7.dylib provides version 9.0.0
Trace/BPT trap

I've already tried updating everything w/ port but the problem still persists. Does anyone have any ideas or suggestions?


I strongly suggest giving up macports and using homebrew. I've never once missed macports since changing. Homebrew uses git and ruby (tools you should be familiar with), and all the installation 'formulae' are very easy to follow. Here's the imagemagick one: https://github.com/mxcl/homebrew/blob/master/Library/Formula/imagemagick.rb

Note that it spends a lot of time working around 'gotchas'. To install, you would just run:

brew install imagemagick


You appear have an older version of libtool. Running "otool -LD /opt/local/lib/libltdl.7.dylib" should show you that. I had a similar issue, and solved it by uninstalling ImageMagick completely, then running

sudo port selfupdate

sudo port upgrade outdated (which upgraded libtool, btw)

and then reinstalling ImageMagick.


Just had the same issue, easily fixed it. You may want to uninstall / reinstall the rmagick gem:

gem uninstall rmagick

gem install rmagick

Worked like a charm for me

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜