@gallery.remove_images! if remain_images.empty?
I had the same problem and I found that you have to call 'remove_images!' if this was the last one. In 'remove_image_at_index' function add:
Looks plausible. Using Paperclip for my new app and won't be able to check this out anytime soon. I"ll try and think of it when I do, thanks anyway.