Rails - Carrierwave进程抛出ArgumentError:此图像列表中没有图像

Eth*_*ins 5 ruby ruby-on-rails carrierwave

尝试实现一个应用auto_orient的进程后!我的图像我收到此错误:

ArgumentError (no images in this image list):
  app/uploaders/image_uploader.rb:36:in `fix_exif_rotation'
  app/controllers/posts_controller.rb:12:in `create'
Run Code Online (Sandbox Code Playgroud)

Carrierwave在没有进程的情况下工作正常但在我添加进程后尝试上传图像时会抛出错误.这是过程:

  process :fix_exif_rotation

  def fix_exif_rotation
    manipulate! do |image|
      image = image.auto_orient!
    end
  end
Run Code Online (Sandbox Code Playgroud)

这是我的帖子#create:

  def create
    @user = User.find(current_user.id)
    @post = @user.posts.create(params[:post].permit(:text, :image))
    redirect_to user_path(@user)
  end
Run Code Online (Sandbox Code Playgroud)

irb*_*ana 11

我得到了同样的错误,并通过安装ghostscript修复它

brew install ghostscript