There seems to be an issue with the system readline utility which prevents Rubies installed by rvm from being compiled. A possible fix to this is to install your own version of readline.
Errors in the make log:
readline.c:730: error: ‘username_completion_function’ undeclared (first use in this function)
readline.c:730: error: (Each undeclared identifier is reported only once
readline.c:730: error: for each function it appears in.)
make[1]: *** [readline.o] Error 1
Your own readline
Compile and install your own readline:
tar xzvf readline-6.1.tar.gz
cd readline-6.1
./configure --prefix=/usr/local
make
sudo make install
cd ..
Give rvm another try …
First you have to remove Ruby versions you tried to compile before:
The following command with a reference to the newly installed newline should do the job:

