rvm single user installation fails with: curl: (35) error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol

Problem

You want to install rvm as a single user in a new linux but when trying to install it with the normal installation instruction:

curl -sSL https://get.rvm.io | bash -s stable --ruby

it fails with the following error:

curl: (35) error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol

Solution

You are behind a proxy server and you need to setup your environment variables for the server in your .profile file like the following (and make sure you source the file afterwards with . ~/.profile):

export http_proxy=http://xxx.xxx.xxx.xxx:port_no/
export https_proxy=https://xxx.xxx.xxx.xxx:port_no/