Reputation: 537
After attempting to implement a process to apply auto_orient! to my images I am getting this error:
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'
Carrierwave works fine without the process but throws an error when I try to upload images after adding the process. Here's the process:
process :fix_exif_rotation
def fix_exif_rotation
manipulate! do |image|
image = image.auto_orient!
end
end
And here is my posts#create:
def create
@user = User.find(current_user.id)
@post = @user.posts.create(params[:post].permit(:text, :image))
redirect_to user_path(@user)
end
Upvotes: 5
Views: 1341
Reputation: 755
I was getting the same error, but had a different issue. My code looked like:
def auto_orient(*args) # remove `(*args)`
manipulate! do |img|
img = img.auto_orient
end
end
Removing the (*args)
fixed the issue.
Upvotes: 0
Reputation: 881
I got the same error, and fixed it by installing ghostscript
brew install ghostscript
Upvotes: 12