Ruby-head failing to pull ffi

The ruby-head RVM is failing with a strange error:

Retrying fetcher due to error (2/4): Bundler::GemspecError There was an error parsing the metadata for the gem ffi (1.9.16): Gem::Requirement::BadRequirementError

What’s more, my environment doesn’t even use ffi (directly or indirectly, as it’s not listed in my Gemfile.lock).

Here is a build with the error:

And here is an identical build except it’s using Ruby 2.6.5 instead of HEAD:

The error message tells you what exact requirement expression is a syntax error.

Search for that string on the build machine to find out where it’s coming from.

If that finds nothing, look for other clues to find that out – e.g. enable verbose/debug logging.