Anyway, I started working on part of a solution for this: Jack (http://github.com/tlrobinson/jack), which is like Rack (http://rack.rubyforge.org) but for JavaScript.
If you don't know, Rack/Jack are like bridges between webservers and Ruby/JavaScript web apps/frameworks, so framework/app devs don't need to worry about what server they're using, they just write to the Rack API. It also includes "middleware" which lets you pre and post process requests, which allows for neat things like intercepting some requests and serving static files, or gzipping responses, etc (in a server agnostic way)
Right now it only works with Rhino+Jetty but ideally it will work with a number of JavaScript interpreters and webservers.
It also includes a Sinatra-like routing framework (called Roundabout), which lets you define routes like
GET("/user/{username}", function() {
var user = this.wildcards["username"];
// do stuff!
return resulting_html;
}
Jack and Roundabout, combined with your other frameworks of choice, like ActiveRecord.js (http://activerecordjs.org/) make a pretty good solution, I think.
MySQL:
Jetty also works from Rhino: Obviously these could be wrapped up in more JavaScripty libraries, but all the hard work is done for you.