On my system I had to change the gmp4 flags from
CPPFLAGS=-I/usr/local/opt/gmp4/include LDFLAGS=-L/usr/local/opt/gmp4/lib gem install cf-ruby-libecp
to
CPPFLAGS=-I/usr/local/opt/gmp@4/include LDFLAGS=-L/usr/local/opt/gmp@4/lib gem install cf-ruby-libecp
Notice the additional @ symbol in the directory paths. Please change the README - this took me hours to troubleshoot