Ruby and PHP are not webapp frameworks. They are programming languages which are popular for web development.
Generally speaking, webapp scalability is not a property of a programming language, and a given webapp framework may at most not hamper scalability. Good scalability is more a property of application design.
There are way too many webapp frameworks out there for a point-by-point comparison that is anything short of encyclopedic.
Also, you can tackle scalability for a given application in several ways. One way is to have a well defined and narrow scope and aim awesome raw performance, so a single machine can serve bazillion of work units. The best example around is Mailinator.
Another way is to make it easier to serve increasing loads by "just" adding more hardware. Pretty much any database-backed webapp framework can scale this way: just add more application servers between a load balancer and a shared database back-end. If you frame the problem this way, your main concern is designing the application to minimize 1. database contention 2. database load.
The last way is design the system to be insanely parallel all the way. Google being the prime example.
In summary: languages or frameworks do not make scalable applications, software architects do.
EDIT: To be clear, my answer is focusing on scalability, that is the ability to handle increasing loads without changing design. This is a different property than speed of execution.