10

This is what I have, did anyone has an idea to make it configuring correctly ?

MacBook-Air-de-Remy-Thellier:~ remythellier$ rvm install 1.9.2
/Users/remythellier/.rvm/rubies/ruby-1.9.2-p0, this may take a while depending on your cpu(s)...

ruby-1.9.2-p0 - #fetching 
ruby-1.9.2-p0 - #extracted to /Users/remythellier/.rvm/src/ruby-1.9.2-p0 (already extracted)
ruby-1.9.2-p0 - #configuring 
Error running './configure --prefix=/Users/remythellier/.rvm/rubies/ruby-1.9.2-p0 --enable-shared  ', please read /Users/remythellier/.rvm/log/ruby-1.9.2-p0/configure.log
There has been an error while running configure. Halting the installation.
the Tin Man
  • 158,662
  • 42
  • 215
  • 303
Rémy Thellier
  • 169
  • 1
  • 3
  • 7
  • Can we see what is in `configure.log`? – Jeremy Dec 23 '10 at 10:58
  • MacBook-Air-de-Remy-Thellier:~ remythellier$ /Users/remythellier/.rvm/log/ruby-1.9.2-p0/configure.log -bash: /Users/remythellier/.rvm/log/ruby-1.9.2-p0/configure.log: Permission denied – Rémy Thellier Dec 23 '10 at 11:10
  • In fact I don't really know how to open it – Rémy Thellier Dec 23 '10 at 11:11
  • why you don't have this read access ? – shingara Dec 23 '10 at 11:11
  • use cat : `cat /Users/remythellier/.rvm/log/ruby-1.9.2-p0/configure.log` – shingara Dec 23 '10 at 11:12
  • MacBook-Air-de-Remy-Thellier:~ remythellier$ cat /Users/remythellier/.rvm/log/ruby-1.9.2-p0/configure.log [2010-12-22 17:56:00] ./configure --prefix=/Users/remythellier/.rvm/rubies/ruby-1.9.2-p0 --enable-shared checking build system type... i386-apple-darwin10.5.0 checking host system type... i386-apple-darwin10.5.0 checking target system type... i386-apple-darwin10.5.0 checking for gcc... no checking for cc... no checking for cl.exe... no configure: error: in `/Users/remythellier/.rvm/src/ruby-1.9.2-p0': configure: error: no acceptable C compiler found in $PATH See `config.log' for more de – Rémy Thellier Dec 23 '10 at 11:18
  • It make me that like 10 times – Rémy Thellier Dec 23 '10 at 11:19
  • I am assuming you don't have `gcc` on your `PATH` or installed? – Jeremy Dec 23 '10 at 11:34
  • I don't think so, have you got some links to find and install it ? – Rémy Thellier Dec 23 '10 at 12:35
  • Try installing xcode http://pragmaticstudio.com/blog/2010/9/23/install-rails-ruby-mac – Jesse Wolgamott Dec 23 '10 at 13:43
  • Download and install the [latest version of XCode](http://developer.apple.com/technologies/xcode.html) from Apple. Registration is required, but it's free. The download takes a little while but it contains all the tools needed to compile Ruby. – the Tin Man Dec 23 '10 at 18:47

5 Answers5

21

Install XCode from your OSX cd. That will give you gcc and everything you need to compile the rubies you want to install.

edit

Mountain Lion no longer ships gcc with XCode, you have to explicitly install it from Preferences -> Downloads -> "Install Command Line Tools" as @boulder_ruby mentioned

brad
  • 31,987
  • 28
  • 102
  • 155
  • Do NOT install XCode from the DVD. It is known to be buggy. Download and install the [latest version of XCode](http://developer.apple.com/technologies/xcode.html) from Apple. It will take a while, but that will avoid the bugs. – the Tin Man Dec 23 '10 at 18:25
  • I've never had issues. You're also prompted to update your XCode through OSX once you've done that so I wouldn't worry about it. But downloading is just as easy, so either way. – brad Dec 23 '10 at 21:53
  • Ok I'm gonna try that, thank you everyone for helping me :) I hope it will work this time ! – Rémy Thellier Dec 25 '10 at 13:22
  • Thanks a lot ! I installed XCode from Apple and now everything work :) – Rémy Thellier Dec 25 '10 at 22:09
  • I have XCode 4, but still having the same issue. Im on 10.7.2, please help. Thanks – Matej Jan 28 '12 at 21:22
  • Not only do you have to install xcode, you have to specify that you want the command line tools. See @boulder_ruby's answer. – tybro0103 Apr 22 '13 at 14:33
  • ya Mountain Lion requires this now. At the time of the answer XCode came with gcc which is no longer the case, I'll update my answer – brad Apr 24 '13 at 15:41
  • I had to install the Command Line Tools from the terminal, as it was no longer available from the Xcode download options. http://stackoverflow.com/questions/9329243/xcode-4-4-and-later-install-command-line-tools, 'xcode-select --install' – bcm May 01 '14 at 04:51
5

If you have just recently installed Xcode, like me, remember that you have to open it first, which starts the installation wizard.

** Also, make sure you specify the installation of command line tools, which, at least in my case, were not included by default. (key here is the C compiler) - inside of Xcode, go to preferences (cmd+,), Downloads, then install command line tools

boulder_ruby
  • 38,457
  • 9
  • 79
  • 100
2

In addition to boulder_ruby's answer, I also had to update to the latest stable version of RVM in order to get the Ruby to install.

John
  • 477
  • 5
  • 13
2

This is probably a little late, but if you're having issues like I did, this article is a lifesaver. You don't just need to install XCode, but also the 'command line tools' which are located in Xcode's preferences:

http://www.moncefbelyamani.com/how-to-install-xcode-homebrew-git-rvm-ruby-on-mac/

Nelga
  • 736
  • 1
  • 12
  • 32
1

Steps I followed for upgrading ruby from 1.8.7 to 1.9.3 (mac osx 10.7)

  • Install RVM https://rvm.io/rvm/install/
  • Then download install xcode from appstore
  • Install command line tools from xcode - Go to xcode->preferences->downloads->components->commandline tools now run
  • 'sudo rvm install 1.9.3
  • rvm use 1.9.3
Agustin Meriles
  • 4,866
  • 3
  • 29
  • 44
Tejasvi Manmatha
  • 564
  • 7
  • 12