Also rails is not a language, it is a framework, aka an opinion. Languages should lean towards being opinion agnostic while frameworks by there very nature should be opinionated.
All I'm saying is JS is more than capable of scaling in both complexity and maintainability.