https://rubyonrails.org/doctrine
They are philosophical vastly different languages. This isn't to say one is better or worse over the other. Just use the right tool for the job. If I was going to do anything with machine learning or data analytics or LLM's, Python is hand's down the right tool for the job.
However, If I were to setup a full fledged web application that required a really short time to market with some complex features, I would probably choose Ruby because of Rails.