Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error installing 1.9.3 with RVM on Lion

I have burned an embarrassing number of hours trying to install ruby and rails on Mac. I am using Lion 10.7.2, Xcode 4.2.1, rvm 1.10.0, and gcc 4.2.1 Does anyone have a surefire way to install ruby with rvm. Or, is there

rvm install 1.9.2 -C --with-readline-dir=$rvm_path/usr --with-iconv-dir=$rvm_path/usr

Produces the error

make[1]: *** [../../.ext/x86_64-darwin11.2.0/tcltklib.bundle] Error 1
make: *** [mkmain.sh] Error 1

Running

rvm install 1.9.3-p0  --with-gcc=clang  

Produces the error

make: *** [.rbconfig.time] Abort trap: 6

Simply running

rvm install 1.9.3

Produces the error

make[2]: *** [../../.ext/x86_64-darwin11.2.0/tcltklib.bundle] Error 1
make[1]: *** [ext/tk/all] Error 2
make: *** [build-ext] Error 2

From reading this, I ran the below in the Terminal and my Mac would not restart until I put the libiconv.2.dylib back in place using Target Disk Mode.

rm /usr/local/lib/libiconv.2.dylib
ln -s /usr/lib/libiconv.2.dylib /usr/local/lib/libiconv.2.dylib

From this link, I also removed a previous install of Macfuse which is known to cause problems

I have reinstalled Xcode twice [Install Xcode from the Application Folder].

Is there another way to get Ruby Installed on Lion? Many thanks as I'm fast running out of ideas
Graham

like image 474
grahama Avatar asked Dec 30 '11 01:12

grahama


3 Answers

The following worked for me:

$ rvm install 1.9.3 --with-gcc=clang

I got that from this page.

like image 106
Jake Avatar answered Nov 13 '22 20:11

Jake


I had this problem too and tried several of the listed solutions unsuccessfully. Then I downloaded XCode 4.3.1 for Lion and the Xcode command line tools update (dated March 7, 2012) from Apple's developer site and just re-ran 'rvm install 1.9.3'. Worked perfectly and installed 1.9.3p125.

Hope this helps

like image 3
Bill LaPrise Avatar answered Nov 13 '22 21:11

Bill LaPrise


Note that RVM itself tells you that it won't work with XCode 4.2:

** Lion Users: DO NOT use Xcode Version 4.2.x for OS X Lion. It currently fails to build several rubies and gems, as well as several Homebrew and Macports packages as well. Xcode Version 4.1 (4B110) works.

You can see this warning again by calling rvm requirements.

The simplest (albeit slow) way to fix the problem is to remove XCode 4.2 and download and install XCode 4.1. You can also apparently fix it with a separate gcc-4.2 installation, but I don't know the details of how you'd do that.

For more detail, see the full discussion on the rvm github tracker

like image 2
Gareth Avatar answered Nov 13 '22 21:11

Gareth