Very good article, I've also been down the path of using Ruby + LaTeX to build print books. It ain't easy.
You might take a look at a project by Matthew Butterick: he made a very nice publishing solution with Pollen - http://pollenpub.com/
He also has an interesting take on eBooks in general: http://practicaltypography.com/economics-year-one.html