0

I'm trying to install Ruby v 1.9.3 via RVM, and I get this error when I run the command:

rvm install 1.9.3

error:

ruby-1.9.3-p0 - #extracting ruby-1.9.3-p0 to /Users/shaboy/.rvm/src/ruby-1.9.3-p0
ruby-1.9.3-p0 - #extracted to /Users/shaboy/.rvm/src/ruby-1.9.3-p0
ruby-1.9.3-p0 - #configuring 
Error running ' ./configure --prefix=/Users/shaboy/.rvm/rubies/ruby-1.9.3-p0 --enable-shared --disable-          
install-doc --with-libyaml --with-opt-dir=/Users/shaboy/.rvm/usr ',
please read /Users/shaboy/.rvm/log/ruby-1.9.3-p0/configure.log
There has been an error while running configure. Halting the installation.

configure.log

[2012-02-12 16:14:10]  ./configure --prefix=/Users/shaboy/.rvm/rubies/ruby-1.9.3-p0 --enable-shared --    
disable-install-doc --with-libyaml --with-opt-dir=/Users/shaboy/.rvm/usr 
configure: WARNING: unrecognized options: --with-libyaml
checking build system type... x86_64-apple-darwin11.2.0
checking host system type... x86_64-apple-darwin11.2.0
checking target system type... x86_64-apple-darwin11.2.0
checking whether the C compiler works... no
configure: error: in `/Users/shaboy/.rvm/src/ruby-1.9.3-p0':
configure: error: C compiler cannot create executables
See `config.log' for more details
Andrew Marshall
  • 95,083
  • 20
  • 220
  • 214
scud bomb
  • 415
  • 3
  • 19
  • can you show us the contents of the log? – Uko Feb 12 '12 at 21:23
  • What's in `/Users/shaboy/.rvm/log/ruby-1.9.3-p0/configure.log`? – Telemachus Feb 12 '12 at 21:24
  • Do you have Xcode installed? The key bit seems to be this: "checking whether the C compiler works... no". To clarify: on OSX you don't have a C compiler installed by default. In order to get one, you must install Apple's Xcode package. – Telemachus Feb 12 '12 at 21:41
  • i do currently have Xcode installed. – scud bomb Feb 12 '12 at 22:18
  • 1
    Ok. Next question - what's in the 'config.log' that 'configure.log' refers to? – Telemachus Feb 12 '12 at 22:29
  • the longest file i have ever seen. whats your email address? i'll send it along – scud bomb Feb 12 '12 at 22:34
  • 3
    Put it up on http://pastebin.com/ or the like and then put a link here. Also, you may get better/quicker help by going onto rvm's IRC channel. It's #rvm on Freenode. – Telemachus Feb 12 '12 at 22:39
  • error is all set. ruby -v 1.9.2 installed via zsh. dont know why i was enocuntering these errors earlier but everything seems to be working now. thanks @Telemachus – scud bomb Feb 12 '12 at 23:20

2 Answers2

0

There was no stable version of ruby on those days but it is stable.Although it giving some

warrnings yet so please you should use ruby 1.9.2 which is stable.

Kashiftufail
  • 10,815
  • 11
  • 45
  • 79
0

I suggest you to install XCode 4.1 and set an environment variable export CC=/usr/bin/gcc-4.2. This is the best solution if you want to install all the version of ruby from 1.8.7 to 1.9.3 and have no problem with gems.

clang solution with XCode > 4.1 or osx-gcc-installer allows you to build only ruby 1.9.3 and will fail build ruby-debugger gems, it will also cause lots of random crashed with mysql2 gems.

nolith
  • 613
  • 6
  • 16