Thanks for the links, which I think would lead to a more productive discussion because they are a comparison of similar frameworks. There are of course difficulties with gauging how much attention each gets (a lower CVE count is not proof of security), but overall Django looks better here.
I was thinking of the third one on this page (I suppose strictly speaking a vuln in a gem outside rails) which was pretty serious:
http://weblog.rubyonrails.org/2013/2/11/SEC-ANN-Rails-3-2-12...
but there was a related YAML bug too at the same time with serialize, which also allowed users to supply input that was then instantiated (madness!). Do lots of people use serialize? I've never explicitly used it, unless it is used behind the scenes somewhere. I remembered the fuss being over JSON because of broader impact but may have misremembered.