Using mogrify, you can use the resize function just passing a width:
Width given, height automagically selected to preserve aspect ratio.
I am trying to find the same option with Rmagick, but it seems that the resize method expects both width and height to be provided.
Any ideas?
Quoting the documentation:
Try this, for example, where you want the new width to be 400px: