起きた問題
$ rvm install 2.2
Searching for binary rubies, this might take some time.
No binary rubies available for: centos/6/x86_64/ruby-2.2.3.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for centos.
Requirements installation successful.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-2.2.3, this may take a while depending on your cpu(s)...
ruby-2.2.3 - #downloading ruby-2.2.3, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:05 --:--:-- 0Warning: Failed to create the file ruby-2.2.3.tar.bz2.part
0 12.7M 0 1402 0 0 270 0 13:43:04 0:00:05 13:42:59 17974
curl: (23) Failed writing body (0 != 1402)
There was an error(23).
Checking fallback: http://ftp.ruby-lang.org/pub/ruby/2.2/ruby-2.2.3.tar.bz2
Checking fallback: http://www.mirrorservice.org/sites/ftp.ruby-lang.org/pub/ruby/2.2/ruby-2.2.3.tar.bz2
curlで書き込めないみたいなエラー。
やったこと
sudo suでRootユーザーになってやってみる。→インストールできた。
ってことで権限の問題なのかなと思ったんですが、よくわからなかったので、一度rvmを再インストールしてみると
$ sudo curl -sSL https://get.rvm.io | sudo bash
Downloading https://github.com/rvm/rvm/archive/master.tar.gz
Installing RVM to /usr/local/rvm/
test -f /etc/profile.d/rvm.sh && source /etc/profile.d/rvm.sh
Installation of RVM in /usr/local/rvm/ is almost complete:
* First you need to add all users that will be using rvm to 'rvm' group,
and logout - login again, anyone using rvm will be operating with `umask u=rwx,g=rwx,o=rx`.
* To start using RVM you need to run `source /etc/profile.d/rvm.sh`
in all your open shell windows, in rare cases you need to reopen all shell windows.
# User,
#
# Thank you for using RVM!
# We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne, Michal & team.
注意書きに
全てのユーザーをrvmグループに追加して再ログインすること
source /etc/profile.d/rvm.sh を実行すること
参考
http://stackoverflow.com/questions/26242712/installing-rvm-getting-error-there-was-an-error23
ってかいてあったのでこちらを実行してみたら無事インストールできました。