zroger / jekyll-minimagick

MiniMagick integration for Jekyll
67 stars 22 forks source link

mini_magick.rb:24:in `choose_processor': undefined method `size' for nil:NilClass (NoMethodError) #9

Open MattReimer opened 10 years ago

MattReimer commented 10 years ago

Hey there,

Any idea what this might be?

https://gist.github.com/MattReimer/7c496330d83defcef549

marcysutton commented 10 years ago

I got around the undefined method 'size' for nil:NilClass error by updating and relinking ImageMagick with Homebrew.

jgrodziski commented 10 years ago

Hi,

I met the same issue with jekyll, actually the nil come from the "mogrify" command that is not found. I you open the Terminal, type "mogrify" and nothing happen then maybe you should reinstall it by any means.

    def choose_processor
      if MiniMagick::Utilities.which('mogrify').size > 0
        self.processor = 'mogrify'
      elsif MiniMagick::Utilities.which('gm').size > 0
        self.processor = "gm"
      end
    end

I solve the issue by installing imagemagick on my mac with brew:

brew install imagemagick

then the jekyll build with the mini_magick works again.