While there is indeed a Ruby on Rails tax, Github is also written in Rails as well (https://github.blog/engineering/architecture-optimization/bu...)
So is Shopify and Stripe. They can scale.
These days, if I want something that has some of the ergonomics of Rails in a platform I know can scale better than Ruby, I reach for Elixir/Phoenix.