Question

Here is what I have done so far.

  1. Clean install of OS X Lion
  2. Downloaded and installed latest version of Xcode from the App Store.
  3. Installed Git
  4. Installed Homebrew
  5. Installed RVM

I am now trying to install Ruby Enterprise Edition for a project with rvm install ree and receive the following error:

$ rvm install ree
ree-1.8.7-2011.03 - #installing
ERROR: Error running './installer -a /Users/FaraazKhan/.rvm/rubies/ree-1.8.7-2011.03
  --no-tcmalloc --dont-install-useful-gems ', please read
  /Users/FaraazKhan/.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.

I have already tried CC=/usr/bin/gcc-4.2 rvm install ree and with the same result.

Was it helpful?

Solution

I was able to duplicate your error, just now. This solved it for me:

$ rvm remove ree
$ export CC=/usr/bin/gcc-4.2
$ rvm install --force ree

OTHER TIPS

Using MacPorts you can install Ruby Enterprise Edition, as well as Ruby 1.9.2 for the local user in OS X Lion while having Xcode 4.2 installed by using "Apple's version of gcc 4.2."

Prerequisites:

  • OS X Lion (tested in 10.7.2)
  • Xcode 4.2
  • rvm 1.9.1
  • MacPorts 2.0.3

Execute the following commands:

$ sudo port install apple-gcc42

$ export CC=/opt/local/bin/gcc-apple-42

then

$ rvm install ree

$ rvm use ree

or

$ rvm install 1.9.2

$ rvm use 1.9.2

optionally

$ rvm use ree --default

or

$ rvm use 1.9.2 --default

I hope this helps.

-Joe

No need to install MacPorts or downgrade to 4.1 to get GCC, I used the installer package at https://github.com/kennethreitz/osx-gcc-installer with xCode 4.2 already installed, and had no problem installing 1.9.2-head and 1.9.2-p290.

I did something similar to what jbg advised. Only I didn't use MacPorts. I just used the latest GCC package for Lion here.

This was after spending about a day and a half trying all of the other suggestions, downgrading to Xcode 4.1, etc. to no avail.

By the way, the direct link to Xcode 4.1 at Apple's site gave me an invalid checksum error, all three times I downloaded it. I saw a Twitter post from someone else who had the same problem.

At the risk of redundancy, I'll post my answer as well, since I tried everything on this page (and many others) and ended up with a hybrid of some of them which seemed the most likely to work. Note that some of these steps may not have been explicitly necessary but they were sufficient (i.e., I didn't go back and remove potentially unnecessary steps to get the simplest path to success).

Environment: Mac OS Lion 10.7.3, Homebrew components, rvm 1.10.2, ree 1.8.7-2012.01, Xcode 4.2.1 with legacy gcc-4.2 available.

Steps:

  1. Ensure that a stable Ruby is current. Used 1.9.2 (rvm use 1.9.2) as 1.9.3 was a potential problem.
  2. rm -fr $rvm_path/usr
  3. rvm pkg install ree_dependencies
  4. rvm remove ree
  5. export CC=/usr/bin/gcc-4.2
  6. rvm install ree \ --with-openssl-dir=$rvm_path/usr \ --with-readline-dir=$rvm_path/usr \ --with-iconv-dir=$rvm_path/usr \ --with-zlib-dir=$rvm_path/usr

I had previously tried the brew-specific solutions but those didn't work for me. Hope this helps someone!

Please do NOT use sudo with RVM, nor do you need to use rvmsudo EXCEPT for when upgrading RVM itself. Please see and read https://rvm.io/support/faq/ (Do I need to use sudo with gems? entry) and https://rvm.io/support/troubleshooting/ (Multi-User Installs - Using the sudo command entry)

Please remove your current installation and start over as using sudo will definitely mess up the permission structure for RVM. Please see the very bottom of https://rvm.io/support/troubleshooting/ (How do I completely clean out all traces of RVM from my system, including for system wide installs? entry)

Then begin again strictly following the Multi-User installation segment of https://rvm.io/rvm/install/

Thank you.

If you are on Lion 10.7.2, and have installed XCode 4.2, you need to downgrade XCode to 4.1

Here's how I did it (it was more complicated than you might think):

  • Download XCode 4.1 from Apple Dev Center (you'll need to login with your dev centre creds)
  • uninstall XCode 4.2

    $ sudo /Developer/Library/uninstall-devtools --mode=all

  • remove the XCode installer from your /Applications directory

  • run the XCode 4.1 package you downloaded, this will install a new XCode installer into /Applications
  • run the XCode installer in /Applications
  • When it stops, asking you to quit iTunes, you need to quit iTunes, and also use Activity Monitor to force quit the iTunes Helper
  • Wait for XCode 4.1 to install
  • Use the steps outlined above to install ree

Cheers, Ian

This is how i did to install it. May be previous answers are already solve your problem. My step may be help people who experience same as me.

Frist, Install MacPort latest version

>rvm uninstall ree
>sudo port install apple-gcc42
>export CC=/opt/local/bin/gcc-apple-4.2
>rvm pkg install zlib openssl readline
>rvm install --force ree

Result is:

IronB:~ ...$ rvm install --force ree
Installing Ruby Enterprise Edition from source to: /Users/.../.rvm/rubies/ree-1.8.7-2011.03
ree-1.8.7-2011.03 - #fetching (ruby-enterprise-1.8.7-2011.03)
ree-1.8.7-2011.03 - #extracting ruby-enterprise-1.8.7-2011.03 to /Users/.../.rvm/src/ree-1.8.7-2011.03
Applying patch 'tcmalloc' (located at /Users/.../.rvm/patches/ree/1.8.7/tcmalloc.patch)
Applying patch 'stdout-rouge-fix' (located at /Users/.../.rvm/patches/ree/1.8.7/stdout-rouge-fix.patch)
Applying patch 'no_sslv2' (located at /Users/.../.rvm/patches/ree/1.8.7/no_sslv2.diff)
ree-1.8.7-2011.03 - #installing 
Removing old Rubygems files...
Installing rubygems-1.8.10 for ree-1.8.7-2011.03 ...
Installation of rubygems completed successfully.
ree-1.8.7-2011.03 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ree-1.8.7-2011.03 - #importing default gemsets (/Users/.../.rvm/gemsets/)

I'm also put this to my ~/.rvmrc for next time

 # Make this work with OS X Lion... for now...
 if [[ `uname -v` =~ "Darwin Kernel Version 11" ]] ; then
       export CC=/opt/local/bin/gcc-apple-4.2
 fi
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top