Tuesday, May 17, 2016

Paperclip::Errors::NotIdentifiedByImageMagickError

identify Captain-America-2011-Movie-Poster-1.jpg
dyld: Library not loaded: /System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries/libclparser.dylib
  Referenced from: /usr/local/bin/identify
  Reason: image not found
Trace/BPT trap: 5

identify -version
dyld: Library not loaded: /System/Library/Frameworks/OpenCL.framework/Versions/A/Libraries/libclparser.dylib
  Referenced from: /usr/local/bin/identify
  Reason: image not found
Trace/BPT trap: 5

This means ImageMagick is not installed on your machine. It would be useful if the paperclip gem makes the assumption explicit. If the pre-requisite software is not installed, ideally, it should throw an exception that identifies the cause of the problem and the resolution to inform the user on how to overcome that error.

You can do:

brew install imagemagick

If you get an error like this:

brew install imagemagick
Warning: Your Xcode (4.5.2) is outdated
Please install Xcode 4.6.2.
Warning: It appears you have MacPorts or Fink installed.
Software installed with other package managers causes known problems for
Homebrew. If a formula fails to build, uninstall MacPorts/Fink and try again.
==> Installing imagemagick dependency: jpeg
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/jpeg-8d.lion.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring jpeg-8d.lion.bottle.1.tar.gz
Warning: Could not link jpeg. Unlinking...
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link jpeg'
==> Summary
🍺  /usr/local/Cellar/jpeg/8d: 18 files, 784K
==> Installing imagemagick
==> Downloading http://downloads.sf.net/project/machomebrew/mirror/ImageMagick-6.8.0-10.tar.gz
######################################################################## 100.0%
==> ./configure --disable-osx-universal-binary --without-perl --prefix=/usr/local/Cellar/imagemagick/6.8.0-10 --enable-shared --disa
==> make install
brew: superenv removed: -L/usr/X11/lib -L/usr/local/lib -O2
brew: superenv removed: -L/usr/X11/lib -L/usr/local/lib -O2
brew: superenv removed: -L/usr/X11/lib -L/usr/local/lib -O2
make[1]: *** [install-recursive] Error 1
make: *** [install] Error 2

READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting

You can install it from the source. Download 

http://www.imagemagick.org/download/ImageMagick.tar.gz
tar xvzf ImageMagick.tar.gz
cd ImageMagick-7.0.3
./configure
make
sudo make install

The ImageMagick Installer for Mac  also failed for me on Mac OS 10.7.5.

No comments:

Post a Comment