Middleman installation fails with invalid version number in mmacosx-version-min

I am running MacOS Mojave 10.14.6

I am trying to install middleman:
sudo gem install middleman
Password:
Building native extensions. This could take a while…
ERROR: Error installing middleman:
ERROR: Failed to build gem native extension.

current directory: /usr/local/lib/ruby/gems/2.6.0/gems/fast_blank-1.0.0/ext/fast_blank

/usr/local/opt/ruby/bin/ruby -I /usr/local/lib/ruby/site_ruby/2.6.0 -r ./siteconf20200103-1239-1t9egmq.rb extconf.rb
creating Makefile

current directory: /usr/local/lib/ruby/gems/2.6.0/gems/fast_blank-1.0.0/ext/fast_blank
make “DESTDIR=” clean

current directory: /usr/local/lib/ruby/gems/2.6.0/gems/fast_blank-1.0.0/ext/fast_blank
make “DESTDIR=”
compiling fast_blank.c
clang: error: invalid version number in ‘-mmacosx-version-min=10.14.0’
make: *** [fast_blank.o] Error 1

make failed, exit code 2

Gem files will remain installed in /usr/local/lib/ruby/gems/2.6.0/gems/fast_blank-1.0.0 for inspection.
Results logged to /usr/local/lib/ruby/gems/2.6.0/extensions/x86_64-darwin-18/2.6.0/fast_blank-1.0.0/gem_make.out

I’m using Mojave and Ruby 2.6.x (2.6.5p114 to be exact) and Middleman and have no problem with this*. But quick googling turned me to this: https://github.com/facebook/infer/issues/1026#issuecomment-444816800 Have you installed the command line tools? This used to be done by running xcode-select --install I don’t know if it is still relevant, though.

* although Ruby 2.6.x is not officially supported by MM yet, I believe.