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/

Replacing spaces with underscores in linux busybox

Problem

You want to replace the spaces in filenames (ie in Brennan’s B2 system), that uses busybox and you do not have all the linux commands available.

Solution

Use the following in the directory with the files (ie flac files). At the moment this command only works in the directory that is being run.

# find . -type f -name "*.flac" -exec ash -c 'mv "$0" "${0// /_}"' '{}' ';'