Rails, as any tool, has its limits. When you're doing things at Twitter's scale, you need other tools.
I like the point on pushing work into a query instead of doing it in rails/ruby. That's not just a rails thing but helps on any framework/platform.
Github seems to have scaled fine on Rails.
Twitter has a many-faceted, hugely complex architecture that to my knowledge still includes Rails.
Not to mention that by the time that twitter needed to scale rails the framework itself was very different and a little less powerfull. That goes to ruby as well.
Well, Shopify is built in rails and its scaling extremely well. Rails can be scaled!