I'm a junior-level Java programmer (and CS student) with some SaaS ideas for the Danish market.
I have no experience in web development beyond some HTML/CSS (+ Bootstrap) and some JavaScript.
Which web framework is ideal for developing SaaS applications like Basecamp and Harvest?
However, for a complex SaaS (any SaaS can get here really), you will need to make some sane choices around modularity and building separate, loosely coupled services before things get out of hand. Node.js (or any of its lightweight frameworks on top) is probably a little stronger than Rails in this regard.
This service-based approach is more difficult with Rails as the community hasn't blessed any consistent conventions around doing it. Any custom convention you create to integrate multiple Rails applications will likely break compatibility with future Rails framework upgrades. There are many companies that are paralyzed and stuck on older versions of Rails because they ran into this problem.
All that being said, Java is still a great choice if you make some modern choices and will help you move forward without being slowed down by learning a new framework. Check out the Modern Java Series here: http://blog.paralleluniverse.co/2014/05/01/modern-java/