Gem update not working unable to connect


~$ sudo gem update --system
ERROR: While executing gem … (Gem::RemoteFetcher::FetchError)
Errno::ECONNRESET: Connection reset by peer - SSL_connect (


For posterity, this appeared to have been solved in the chat.
I will post the solution here if this thread is relevant to anyone:

sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
gpg --keyserver hkp:// --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
curl -sSL | bash -s stable
source ~/.rvm/scripts/rvm
rvm install 2.5.0


Thank you, @JonathanYiv!

This worked great!