It's interesting also that people always talk about Rails but don't mention JSP and .NET, which I think are actually a lot more popular last time I looked around. I guess it depends on who you ask.
I feel like JavaScript is in a sweet spot right now because it has the inherent advantage of being the _only_ language you can run inside a browser, so you can do things with it that would be very hard or complicated in other languages.