I am using carrierwave
and mini_magick
gems to use images inside rails_admin
. When I upload an image it fails with this error:
Failed to manipulate with MiniMagick, maybe it is not an image?
Original Error: `identify C:/Users/Zeke/AppData/Local/Temp/mini_magick20161027-21132-xdongz.png` failed with error:
identify.exe: RegistryKeyLookupFailed `CoderModulesPath' @ error/module.c/GetMagickModulePath/662.
identify.exe: no decode delegate for this image format `PNG' @ error/constitute.c/ReadImage/501.
And this doesn't happen when I don't include the following lines in my uploader.rb
# Process files as they are uploaded:
process resize_to_fit: [800, 600]
# Create different versions of your uploaded files:
version :thumb do
process resize_to_fill: [40, 30]
end
I require thumbnails, and how do I do it?
Here's What I'm sure of:
identify C:/Users/Zeke/AppData/Local/Temp/mini_magick20161027-21132-xdongz.png
executes successfully when run in cmd
(without admin priv, if that matters)identify -list format
gives a huuuuge list that almost contains every image format I can think of. And yes, it includes JPG
, JPEG
, PNG
and all that I need.convert -version
does include jpeg png delegatesWhat am I doing wrong?
Both identify
and convert
I tested were working fine except for the fact that they were not actually used by rails
, which used another installation of imagemagick
which was very old and threw this translation missing
error at first which I managed to solve by adding a few lines in en.yml
It is notable that System Environment Variables can be overridden by set path that only lasts long for that instance of
cmd
Making rails use the new version of ImageMagick
solved the problem.
Credits: Mark Setchell