Note that there are some explanatory texts on larger screens.

plurals
  1. POPaperclip::NotIdentifiedByImageMagickError image is not recognized by the 'identify' command
    primarykey
    data
    text
    <p>i´m getting this error when editing a model specifically when i delete an image associated to it and I select another:</p> <pre><code>Paperclip::NotIdentifiedByImageMagickError in Admin/packsController#update Chrysanthemumprueba4.jpg is not recognized by the 'identify' command. C:/Users/.../vendor/plugins/thoughtbot-paperclip-fc792c8/lib/paperclip/geometry.rb:24:in `from_file' </code></pre> <p>But when i create a new pack and I select images for it, it works ok.</p> <p>I have two tables: packs and pack_images,and pack_images has the photos for the pack associated, here are the relations:</p> <pre><code>class Pack &lt; ActiveRecord::Base has_many :pack_images, :dependent =&gt; :destroy end class PackImage &lt; ActiveRecord::Base belongs_to :pack attr_accessor :height, :width has_attached_file :photo, :url =&gt; "/:attachment/:class/:id/:style_:basename.:extension", :styles =&gt; {:principal =&gt; "240x240&gt;", :original =&gt; "400x400&gt;", ...} end </code></pre> <p>This is the controller's action that throws me the error:</p> <pre><code>def update @pack = Pack.find(params[:id]) @pack.pack_products unless params[:pack][:pack_images_attributes].nil? params[:pack][:pack_images_attributes].count.times do |i| unless params[:pack][:pack_images_attributes][:"#{i.to_s}"][:photo].blank? file = params[:pack][:pack_images_attributes][:"#{i.to_s}"][:photo] dimensions = Paperclip::Geometry.from_file(file) @pack.pack_images[i].width = dimensions.width @pack.pack_images[i].height = dimensions.height end end end respond_to do |format| @pack.update_attributes(params[:pack]) format.html { redirect_to(admin_pack_path(@pack.id), :notice =&gt; 'Pack updated') } end </code></pre> <p>I noticed that, when updating I get less parameters (only the photo's name) than when creating (photo's name,file type,width,height,etc).</p> <p>I hope you can help me</p> <p>Thank you very much</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload