[Ruby]在Lion安裝ree失敗

| Comments

因為升級lion的關係,
我也重灌了ruby的環境
不知道為什麼在灌ree(Ruby Enterprise Edition)的時候出現了以下錯誤

$rvm install ree

ERROR: Error running ‘./installer -a /Users/<UserName>/.rvm/rubies/ree-1.8.7-2011.03  –no-tcmalloc –dont-install-useful-gems ‘, please read /Users/<UserName>/.rvm/log/ree-1.8.7-2011.03/install.log
ERROR: There has been an error while trying to run the ree installer. Halting the installation.

按照他所說的我們到log看一下Error結果是以下

*** ERROR: Ruby is not installed ***
The Ruby Enterprise Edition installer is written in Ruby. This source tarball bundles precompiled versions of Ruby for many platforms for the purpose of running this installer, but unfortunately we did not include a precompiled Ruby binary for the current platform. So please install Ruby manually, then run this installer again.

上網google一下,發現應該是profile的問題 http://stackoverflow.com/questions/6804195/cant-install-ruby-enterprise-edition-with-rvm-on-osx-lion

我們先把原來的ree刪除之後修改profile再重新安裝一次ree
$ rvm remove ree
$ export CC=/usr/bin/gcc-4.2
$ rvm install –force ree