I recently updated my system to Ubuntu 18.04 LTS, and since then, the Ruby version seems to have updated to 2.5. The issue is that, when attempting to deploy a project that uses
cd ~/src
wget https://www.openssl.org/source/openssl-1.0.2s.tar.gz
tar xvzf openssl-1.0.2s.tar.gz
cd openssl-1.0.2s
mkdir ~/.rubies/openssl-1.0.2s
./config --prefix=$HOME/.rubies/openssl-1.0.2s --shared
make
make install
RUBY_CONFIGURE_OPTS=--with-openssl-dir=$HOME/.rubies/openssl-1.0.2s rbenv install 2.3.1
worked for me