Example for compiling Ruby versions dependent on OpenSSL 1.1 via RVM.
Ruby 2.4.x - 2.7.x require OpenSSL 1.1 which has been superseded on most operating systems.
Ruby >= 2.4.x (OpenSSL 1.1)
Install the OpenSSL 1.1 dependency:
pacman -Sy openssl-1.1
Build with RVM:
CFLAGS+=" -I/usr/include/openssl-1.1" \
LDFLAGS+=" -L/usr/lib/openssl-1.1 -lssl" \
PKG_CONFIG_PATH=/usr/lib/openssl-1.1/pkgconfig \
rvm install 2.7.7