I assume the difficulty is storing the data and then retrieving the right data when generating a page. Yeah, you can use a SQL database, but that doesn't seem to be working very well. So they probably need to write some custom storage backend that is actually designed for the load that is put on it. Relational databases are general solutions. General solutions are good for general problems, but not necessarily specific problems.
Anyway, if the problem happens to be that the Rails frontend is too slow, speeding that up isn't going to buy them anything long-term. Eventually the database is going to bog them down even if the web GUI is hand-optimized assembly.
JMHO, obviously I have no idea what the twitter codebase looks like or what specific problems they are having. I also don't use Ruby or Rails, but I doubt that's their problem.