Replace your version definition as below:
version :square do
process resize_to_fill: [200, 200]
end
You do not need to define the file name as Carrierwave will make a new version of file with square_
prefix. So, its unique anyway.
When you call Image.find(1).destroy
, Carrierwave destroys the original file and then looks for a file with square_*
prefix to delete.