GitHub was adopted early by the Ruby community, and it had a disproportionate number of Ruby projects when compared to other version control hosts (Sourceforge, etc.). A lot of projects are moving to GitHub from other hosts now, and Ruby pretty much had nowhere to go but down as a percentage of the total.
Also, the tendency for many small Rubygems (and Bundler's support for installing gems from git) meant you had many more repos than you would for languages like Java, where it's pretty common to build multiple jars out of a single repo. The npm community seems to be if anything even more prolific in producing large quantities of very narrowly tailored libraries.
I think this is a case where the pie has just gotten bigger, rather than anyone's piece getting smaller.
Also, the tendency for many small Rubygems (and Bundler's support for installing gems from git) meant you had many more repos than you would for languages like Java, where it's pretty common to build multiple jars out of a single repo. The npm community seems to be if anything even more prolific in producing large quantities of very narrowly tailored libraries.
I think this is a case where the pie has just gotten bigger, rather than anyone's piece getting smaller.