Memory is important, but I wouldn't skimp on the CPU. In my experience (a rails app on mongrel/nginx and a php5 app on lighttpd/nginx), CPU has been the bottleneck, not memory. It's also a lot easier to add memory than to increase CPU power.
I can't imagine how that could possibly be true without pathologically CPU intensive code. But, all things are possible in an infinite universe, so I won't argue too strenuously about it.
I just haven't seen any web service situations in the past seven years, or so, where CPU was the bottleneck, and I've been involved involved in a lot of web scalability projects (it's what my previous company specialized in).
Are you sure you weren't actually seeing some kind of thrashing triggered by being low on memory or too-slow disk access? For example, when Squid gets overloaded, CPU usage spikes up to nearly 100%--but increasing the speed of the CPU does nothing to make things go faster. You have to give it more memory and more disk throughput. The reason it looks like a CPU usage spike is because the select or poll loop is so busy waiting for file descriptors to be ready (not an entirely accurate description...but it should give you the gist of it if you've ever done any concurrent programming in C without using threads). But maybe PHP and Ruby can work the CPU in pathological ways that I've not seen...modern CPUs are just so damned fast, it's hard to imagine.
The universe isn't infinite. If that'd be the case, there'd be infinite matter, and therefore infinite gravity, and we'd all be reduced to black hole singularities :-)
In that case, I guess it's impossible for CPU to be the limiting factory in this universe. ;-)
(And, technically, there is still debate about whether the universe is infinite or not. And, our universe may yet reduce to a singularity. Just because it hasn't happened yet, doesn't mean it won't. The universe is tricky like that.)