Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Issues installing ruby 1.9.3 - error: C compiler cannot create executables

I am trying to install ruby 1.9.3 on my Macbook pro but I've run into a wall.


Here are the essentials;

OS: OS X 10.7.3

Xcode: 4.3


When I run the rvm command I get the following...


"rvm install 1.9.3"

-------------------

Fetching yaml-0.1.4.tar.gz to /Users/vindigo/.ram/archives

Extracting yaml-0.1.4.tar.gz to /Users/vindigo/.rvm/src

Configuring yaml in /Users/vindigo/.rvm/src/yaml-0.1.4.

Error running ' ./configure --prefix="/Users/vindigo/.rvm/usr" ', please read /Users/vindigo/.rvm/log/ruby-1.9.3-p125/yaml/configure.log

Compiling yaml in /Users/vindigo/.rvm/src/yaml-0.1.4.

Error running 'make ', please read /Users/vindigo/.rvm/log/ruby-1.9.3-p125/yaml/make.log



Database file /Users/vindigo/.rvm/config/packages does not exist.


Installing Ruby from source to: /Users/vindigo/.rvm/rubies/ruby-1.9.3-p125, this may take a while depending on your cpu(s)...


ruby-1.9.3-p125 - #fetching

ruby-1.9.3-p125 - #extracted to /Users/vindigo/.rvm/src/ruby-1.9.3-p125 (already extracted)

ruby-1.9.3-p125 - #configuring

Error running ' ./configure --prefix=/Users/vindigo/.rvm/rubies/ruby-1.9.3-p125 --enable-shared --disable-install-doc --with-libyaml --with-opt-dir=/Users/vindigo/.rvm/usr ', please read /Users/vindigo/.rvm/log/ruby-1.9.3-p125/configure.log

There has been an error while running configure. Halting the installation.



CONFIGURE.LOG

-------------------

[2012-02-26 14:56:49] ./configure --prefix="/Users/vindigo/.rvm/usr"

checking for a BSD-compatible install... /usr/bin/install -c

checking whether build environment is sane... yes

checking for a thread-safe mkdir -p... config/install-sh -c -d

checking for gawk... no

checking for mawk... no

checking for nawk... no

checking for awk... awk

checking whether make sets $(MAKE)... yes

checking for gcc... gcc

checking whether the C compiler works... no

configure: error: in `/Users/vindigo/.rvm/src/yaml-0.1.4':

configure: error: C compiler cannot create executables

See `config.log' for more details



MAKE.LOG

-------------------

make: *** No targets specified and no makefile found. Stop.


Another suggestion I received was to use the following command...

"

rvm install 1.9.3 --with-gcc=clang"


but I get the same results.


At this point I've exhausted my options and I am not sure what to try next, other than starting from scratch and reloading the entire OS.


Any help would be greatly appreaciated.


Thanks,


Rich

MacBook Pro, Mac OS X (10.7.3)

Posted on Feb 26, 2012 3:36 PM

Reply
4 replies

Feb 26, 2012 6:03 PM in response to Vindigo09

Phew! That was harrowing.


Found this, and it solved the problem. Refreshingly, it was written in English 😉 and done well at that!

http://pragmaticstudio.com/blog/2010/9/23/install-rails-ruby-mac


Follow all the instructions. The main missing ingredient for me was downloading the developer tools for the command line from Apple. I had to register there, but it was free. These tools seemed to install the compiler where it was needed. You might need a github something or other, I don't know. I think I downloaded it as some point. Anyway, I did everything this author told me, and now I have my first rails app! Good luck - Joel

Issues installing ruby 1.9.3 - error: C compiler cannot create executables

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.