OpenSSL issues building Ruby 2.2.2 with ruby-install

Trying out chruby and ruby-install and installing Ruby 2.2.2 with ruby-install was giving be the error:

Setting the LDFLAGS env var solved this for me: