$ rvm install ruby-1.8.7-p249
Installing Ruby from source to: /home/sayuj/.rvm/rubies/ruby-1.8.7-p249, this may take a while depending on your cpu(s)...
ruby-1.8.7-
Looks like the problem is:
ossl_pkcs7.c:573:1: error: unknown type name ‘STACK’
My guess is its a dependancy issue.
Look at the output of:
rvm notes
And ensure you have followed all the steps for Ubuntu.
One obvious thing is that Ubuntu 11.10 is only just out - might be worth searching/posting on the Ubuntu forums to see if anyone there has had any issues with it and rvm.
Be sure to install ruby with rvm and giving the open-ssl-dir explicitly like this:
rvm cleanup
rvm install ruby-1.8.7 --with-openssl-dir=$HOME/.rvm/usr
From here : http://ahmy.yulrizka.com/2011/10/ruby-ree-1-8-7-openssl-error/
rvm pkg install openssl
And from one of the answers here: https://stackoverflow.com/a/8544958/178975
rvm install ruby-1.8.7 --with-openssl-dir=<rvm_dir>/usr
where rvm_dir could be $HOME/.rvm or /usr/local/rvm or wherever you have installed rvm