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
to0.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