3

I've had Rails installed with Paperclip working just fine for a while until today. I don't know what cause this. I tried to learn about ImageMagick so I download it from the official website. After installed it I got an error about libpng15.15.dylib or something like that. So, I remove ImageMagick using rm -rf command from CLI. Then I installed it again using homebrew.

After that I ran my app again and got this error.

Command :: identify -format '%wx%h,%[exif:orientation]' '/var/folders/...-3gfyiu.png[0]' 2>/dev/null 
[paperclip] An error was received while processing: #<Paperclip::Errors::NotIdentifiedByImageMagickError: Paperclip::Errors::NotIdentifiedByImageMagickError>

When I ran identify -format '%wx%h,%[exif:orientation]' '/var/folders/5x/...3gfyiu.png[0] I got this error.

identify: unable to open image '/var/folders/....': No such file or directory @ error/blob.c/OpenBlob/2705.
identify: unable to open file '/var/folders/....' @ error/png.c/ReadPNGImage/3921.

and identify -format '%wx%h,%[exif:orientation]' '/var/folders/5x/...3gfyiu.png I got this error.

 unknown image property "%[exif:orientation]" @ warning/property.c/InterpretImageProperties/3762.

I know there are numerous Stackoverflow questions related to this, but all of those accepted answers didn't work for me.

These are what I've done so far.

  • Paperclip.options[:command_path] = "/usr/local/bin/identify"
  • Paperclip.options[:command_path] = "/usr/local/bin"
  • brew update && brew upgrade imagemagick
  • uninstall and install imagemagick
  • downgrade cocaine to 0.3.2
  • brew uninstall imagemagick jpeg libtiff brew install imagemagick
  • brew install imagemagick --build-from-source

The identify or convert commands work fine from CLI.

Environment:

  • mongoid-paperclip 0.0.10
  • paperclip 4.3.2
  • mini_magick 4.5.1
  • Rails 4.2.4
  • Mac OS X Yosemite
Anon
  • 51
  • 4
  • Absolutelty the same problem today after brew upgrade imagemagick. Somehow `identify -format '%wx%h,1' 'some_pic.jpg'` command works and `identify -format '%wx%h,1' 'some_pic.jpg[0]'` isn't – aristofun Jun 05 '16 at 19:03
  • @aristofun so how do you solve this? – Anon Jun 06 '16 at 04:49
  • 1
    Seems to be an imagemagick 6.9.4-7 bug http://stackoverflow.com/questions/37646471/imagemagick-brackets-in-file-names-no-such-file-or-directory-mac-os-x/37647282?noredirect=1#comment62775533_37647282 – aristofun Jun 06 '16 at 08:34
  • @aristofun so, does it work? – Anon Jun 06 '16 at 08:48
  • @aristofun thanks!! it's worked!! – Anon Jun 06 '16 at 09:28

1 Answers1

2

Manually installing imagemagick-6.9.3-10 seems to fix the problem. So I believe it's a bug in imagemagick.

See imagemagick: brackets in file names 'No such file or directory' — Mac OS X

Community
  • 1
  • 1
Anon
  • 51
  • 4