0

I am getting this error:

Image Paperclip::Errors::NotIdentifiedByImageMagickError 

...in Ruby on Rails in Windows 10 when cropping the image with the Paperclip styles option in my Model.

class Post < ActiveRecord::Base
  has_attached_file :img, styles: { large: "600x600>", medium: "300x300>", thumb: "100x100>" }
  validates_attachment_content_type :img, content_type: /\Aimage\/.*\Z/
end

However, it works fine if I remove the style attribute, i.e.:

class Post < ActiveRecord::Base
  has_attached_file :img
  validates_attachment_content_type :img, content_type: /\Aimage\/.*\Z/
end
Jordan Running
  • 102,619
  • 17
  • 182
  • 182
Coder
  • 39
  • 7
  • This error is raised when Paperclip can't identify the file as an image. What is the file type of the image? Have you tried uploading other image files? If that's not the problem, here's a related question: http://stackoverflow.com/questions/16072338/papercliperrorsnotidentifiedbyimagemagickerror-on-windows-7 The answers suggest that Paperclip may not be able to find the ImageMagick executable and that setting `Paperclip.options[:command_path]` to the correct path may fix the problem. – Jordan Running Jan 21 '16 at 16:35
  • Thanks Got it, Works fine now – Coder Jan 21 '16 at 16:57

0 Answers0