ruby on rails - PaperClip Error NotIdentifiedByImageMagickError when scaling images -


i have been banging head against several days. recently, image uploader has stopped working properly. have investigated several possibilities, have none of suggested solutions have worked in case.

the error message is:

#<paperclip::errors::notidentifiedbyimagemagickerror:paperclip::errors::notidentifiedbyimagemagickerror>  

here details:

  • mac os x 10.8.3
  • imagemagick 6.8.4-4 2013-03-29
  • libtool => /usr/bin/libtool
  • rails 3.2.13
  • ruby 1.9.3p194

development.rb contains appropriate path (and have verified correct using which identify)

paperclip.options[:command_path] = "/usr/local/bin/" 

gemfile.lock (relevant portion)

paperclip (3.4.1)   activemodel (>= 3.0.0)   activerecord (>= 3.0.0)   activesupport (>= 3.0.0)   cocaine (~> 0.5.0) 

model (i updating classroom object, picture resides in location model. (classroom has_one :location, :as => :locatable)

model location.rb

class location < activerecord::base   ## paperclip method uploading location images    has_attached_file :picture, :styles => {:show => "1200x500#", :medium => "300x300#", :thumb => "100x100>"}, :convert_options => {:show => "-gravity center"}     has_attached_file :building_sign, :styles => { :show => ["1200x500#", :jpg], :medium => ["300x300#", :jpg], :thumb => ["100x100#", :jpg] }, :convert_options => {:show => "-gravity center"}   belongs_to :locatable, :polymorphic => true   belongs_to :location_type     validates :name,  :presence => true    validates :latitude, :presence => true,                        :length => {:within => 9..18},                        :numericality => true   validates :longitude, :presence => true,                         :length => {:within => 9..18},                         :numericality => true end 

controller classrooms_controller.rb

def update   @classroom = classroom.find_by_facility_code_heprod(params[:id].upcase)    respond_to |format|     if @classroom.update_attributes(params[:classroom])       format.html { redirect_to(@classroom, :notice => 'classroom updated.') }       format.xml  { head :ok }     else       format.html { render :action => "edit" }       format.xml  { render :xml => @classroom.errors, :status => :unprocessable_entity }     end   end end 

what i've tried.

  • i've made sure image name simple (usb2230.jpg), no colons.
  • i've updated version of imagemagick recent.
  • i've re-downloaded , reinstalled commandline tools 10.8.3 (someone suggested issue might related outdated libtool).
  • i've rebooted computer.
  • i've tried variations on gem versions including

    # variation 1 gem 'paperclip', '~> 2.8.0' gem "cocaine", "=0.3.2"  # variation 2 gem "paperclip", "~> 3.4.0" gem "cocaine", "= 0.4"  # variation 3 (which reflected in included gemfile.lock info above). gem "paperclip", "~> 3.4.0" 

if remove scaling,

:styles => {:show => "1200x500#", :medium => "300x300#", :thumb => "100x100>"}, :convert_options => {:show => "-gravity center"} 

the upload works, kind of need scaling ;-)

can see missing?

i solved issue. brew makes directory call cellar, /usr/local/cellar verify if don`t have 2 imagemagick, had 1 named imagemagick-ruby182, so, if have run brew uninstall imagemagick-ruby182, , normal imagemagick, , reinstall image magic.


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -