Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Brendan Ferguson
Courses Plus Student 13,821 PointsPaperclip::Errors::NotIdentifiedByImageMagickError
I was following along with the Advanced Social Features in Ruby on Rails project, in the section on resizing images. Everything was going fine, and I was able to upload image attachments, but when I tried to add the :thumb parameter to uploaded avatar images, it was unable to find the image. I get these errors:
4 errors prohibited this user from being saved:
Avatar Paperclip::Errors::NotIdentifiedByImageMagickError [x4]
I'm using ImageMagick-6.8.6-Q16 on a Windows 7 PC. I copied all of the project files into my own project directory so there would be no code discrepancies, but that didn't help. It also no longer shows the users' avatars on the home page.
Any idea what might be going wrong?
1 Answer
Charles Talmin
1,525 PointsI too could not figure out how to make ImageMagick be more accommodating. Here was my problem and how I fixed it:
I was getting the same Paperclip::Errors::NotIdentifiedByImageMagickError. However, I could still upload images and documents in the statuses area, via attachment. All the attachments would display as text (example, "picture.jpg" until someone clicked them.) So I don't think these are related capabilities, in terms of depending on ImageMagick.
On the ImageMagick page, under Binary Windows Installations, I first used ImageMagick-6.8.6-9-Q16-x86-dll.exe. However, after much difficulty I could not get that to work in Treebook. The program "IMDisplay" would run normally on my PC, once I clicked the desktop file, but it was not working at all for my online purposes.
In the end, I deleted that installation (Windows Uninstall.)
Going back to the IM download page (binary, windows, same page as before) I instead elected to go for ImageMagick-6.8.6-9-Q16-x64-dll.exe. I am running Windows 8 x64, so that seemed more suitable (the descriptions on the same page say which are Win32 and which are Win64.)
A minor note: I did not shut down any other running apps during my first installation of IM. It did "recommend" this, but I did not elect to do it. However, on the second approach, with a different installation, I closed all other apps.
Once I began installing IM for the second time, I carefully read all notes. IM seemed a bit hard to please, so I was extra cautious.
I ran the following in a bare (not "rubified") CMD window (Run>CMD). These are per the instructions that can be found in the IM install wizard, once it is successful.
C:\Users\MyAdminUsername>convert wizard: wizard.jpg
C:\Users\MyAdminUsername>convert wizard.jpg win:
After "convert wizard: wizard.jpg" it won't really say anything, just give the "C:\ ..." prompt again. However keep going with the second "convert..." command as mentioned above. Then it will open the converted file, showing a successful installation.
Brendan Ferguson
Courses Plus Student 13,821 PointsBrendan Ferguson
Courses Plus Student 13,821 PointsCharles, thank you so much for taking the time to respond. You are a credit to humanity. I'm not sure if it was installing the 64-bit version, or simply shutting down all programs before installing, but your suggestion seems to have done the trick! Thanks again for helping me get back on track.