Depends on your use-cases - Rails is unparalleled in my opinion for getting a web app up and running, testing startup ideas, and building quickly in response to customer feedback.
I've been using Python recently as I've done more ML work, and I do prefer Ruby (though the syntaxes are similar and you won't have any difficulty).
If you learn for Rails, start with 5.2.3, webpacker and the other black magic in Rails 6 will frustrate you and currently eliminates a lot of the ease of getting started and building relatively sophisticated web apps quickly.