Quoting the documentation:
Use the
change_geometry
method to resize an image with constraints such as "maintain the current proportions."
Try this, for example, where you want the new width to be 400px:
image = image.change_geometry("400") {|cols, rows, img| img.resize!(cols, rows)}