I have no love for Rails, but blaming it for Twitters old problems is not fair.
That said, Mastodon has much of the same problem, and is only "saved" by the combination of federation and ten years of hardware advances. Thankfully, the federation means there's plenty of opportunity for people to experiment with other implementations of ActivityPub (or even implementations of the full Mastodon API), or fixes to it.
https://youtu.be/LFLl9q-bEgk