I think that is a side-effect that ruby in rails was ruby in the mind of many, and python was weak at first in web (before django).
In the meantime, python get a lot of love for scientific computing and other stuff, but ruby (and others, I think no even java or .net) not and then get behind in this area.
So now, when the web side have more viable options and ruby is just one of many, the effect of web on ruby is felt more, but python have a good fallback on the rest.
Python have a more diverse portfolio of options ;)