$ rvm get latest
$ rvm reload
$ rvm version
rvm 1.14.1 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
$ rvm install 1.9.1
The provided compiler '/usr/bin/gcc' is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`.
LLVMじゃコンパイルは出来ねーぞみたいなことが書いてある。
gccが入ってあるか探す。
$ ls /usr/bin/ | grep gcc
gcc
i686-apple-darwin11-llvm-gcc-4.2
llvm-gcc
llvm-gcc-4.2
コンパイルにgccを使うために環境変数を指定。
$ export CC=gcc
$ rvm install 1.9.1
Ruby 'ruby-1.9.1-p431' was build using clang - but it's not (fully) supported, expect errors.
Please be aware that you just installed a ruby that requires 2 patches just to be compiled on up to date linux system.
This may have known and unaccounted for security vulnerabilities.
Please consider upgrading to Ruby 1.9.3-194 which will have all of the latest security patches.
Ruby 1.9.3-194を使えよって警告がでたけど気にしない
$ rvm list
rvm rubies
ruby-1.9.1-p431 [ i386 ]
$ rvm install 1.9.1
できた!