Gem broke today... incompatible marshal file format

Lots of people have been getting:

ERROR:  While executing gem ... (TypeError)
incompatible marshal file format (can't be read)
format version 4.8 required; 60.33 given

when executing gem . I uninstalled runby 2.4.1, which broke my jekyll install, so I was trying to install jekyll for ruby 2.6.1. Lots of web pages talk about flushing rvm, removing .gem/specs/* etc. none of this worked for me.

But, this stackoverflow got it right. The problem is accurately described by the comment:

I'd like to add some nuance to this answer: ~/.gemrc contained a referce use
rubyforge as a source. This was relevant 10 years ago, but these days gems
live on rubygems.org, so you should have a reference to have
https://rubygems.org as source instead.

I moved .gemrc aside, and it stopped asking for data from gems.github.com, which actually was returning a 404, and the problem went away. ARGH. If only Gem had errored on the URL correctly.