“Ruby on Rails” is a programming language, more or less. It’s a development platform. It’s not a CMS.
WordPress, done correctly, scales just fine. However, the most common case of WP usage is for small sites on shared, overloaded, hosts. There, naturally, the site can’t scale because the host is simply not enough to handle the amount of traffic.
WordPress can be scaled more or less indefinitely, it’s all really just a matter of your traffic vs. your hardware and site design.
While different people will give you different opinions on this topic, I think that PHP is far more suitable and mature to use for a major scalable site than Ruby is. Ruby is neat, but new-ish. It’s not been proven to scale very well in the long term, although some (few) major sites have been built off it before. To pick the highest-profile example, Twitter was originally built using Ruby, then after two years of major scaling issues, abandoned it entirely for something else (unknown as to what they switched to). This is not unusual, it’s built into Ruby from its very beginnings. It’s a major design goal of Ruby to trade software performance for developer performance. So it will naturally be slow, because it’s supposed to. It has gotten better, but it will not be really usable for large-scale deployment for the next 5 years, IMO.
Twitter didn’t scale well with Ruby because the did it their way. Ruby scales, PHP scales it just a matter of the architecture and design. By design and architecture Twitter was a mess but they still blamed Ruby for it.
Their Messaging Queue was Starling which talks to the memcache protocol and that MQ does not perform well, it’s the slowest and baddest of them all. So they moved to Scala now so let’s see what excuse they will bring out of the closet.
Anyhow read here:
http://codex.wordpress.org/High_Traffic_Tips_For_WordPress