title: Rails 4 Carrierwave + Minimagick: Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: `mogrify -crop
body: <p>Been researching around but fail to pinpoint the problem: I am following Railscasts PRO #182 on cropping images using JCrop, Carrierwave and Minimagick. As I come to recreating image versions I am prompted the error:</p>
  
  <blockquote>
    <p>CarrierWave::ProcessingError (Failed to manipulate with MiniMagick, maybe it is not an image? Original Error: <code>mogrify -crop! 250x250+531+32 /tmp/mini_magick20160108-6544-1ec50pf.png</code> failed with error:
    mogrify: unrecognized option <code>-crop!' @ error/mogrify.c/MogrifyImageCommand/4197.
    ):
      app/uploaders/image_uploader.rb:48:in</code>crop'
      app/models/course.rb:15:in <code>crop_image'
      app/controllers/courses_controller.rb:12:in</code>update'</p>
  </blockquote>
  
  <p>Can somebody help me understand what this error is indicating?</p>
  
  <p>Model</p>
  
  <pre><code>class Course &lt; ActiveRecord::Base
    attr_accessor :crop_x, :crop_y, :crop_w, :crop_h
    after_update :crop_image
  
    mount_uploader :image, ImageUploader
  
    def crop_image
      image.recreate_versions! if crop_x.present?
    end
  end
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>class CoursesController &lt; ApplicationController
  
    def update
      @course = Course.find(params[:id])
      if @course.update_attributes(course_params)
        if course_params[:image].present?
          render :crop
        else
          redirect_to @course, notice: 'Successfully updated'
        end
      end
    end
  
    def course_params
      params.require(:course).permit(:title, :image, :crop_x, :crop_y, :crop_w, :crop_h)
    end
  end
  </code></pre>
  
  <p>ImageUploader</p>
  
  <pre><code>class ImageUploader &lt; CarrierWave::Uploader::Base
    include CarrierWave::MiniMagick
    storage :file
  
    def store_dir
      "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
    end
  
    version :thumb do
      process :crop
      process :resize_to_fit =&gt; [250, 250]
    end
  
    def crop
      if model.crop_x.present?
        resize_to_fit(800, 350)
        manipulate! do |img|
          x = model.crop_x.to_i
          y = model.crop_y.to_i
          w = model.crop_w.to_i
          h = model.crop_h.to_i
          img.crop!("#{w}x#{h}+#{x}+#{y}")
        end
      end
    end
  end
  </code></pre>