The compiler that comes with Xcode doesn't work with ruby. 

You need to install the version of gcc that works with it and set up a symlink. 

I'm on a plane so I don't have the details with me. Google a bit and you should 
find blog entries with details. 

On Dec 28, 2012, at 1:30 PM, Adam Zerner <[email protected]> wrote:

> I'm working on Michael Hartl's ruby on rails tutorial 
> http://ruby.railstutorial.org/ruby-on-rails-tutorial-book#sec-development_tools.
> 
> I installed Git, updated my OS to 10.8.2 and downloaded XCode 4.5.2.
> 
> when I type in
> 
> rvm install 1.9.3
> this long thing comes up...
> 
> Ruby (and needed base gems) for your selection will be installed shortly.
> Before it happens, please read and execute the instructions below.
> Please use a separate terminal to execute any additional commands.
> 
>   Notes for Mac OS X 10.8.2, Xcode 4.5.2.
> 
> For JRuby:  Install the JDK. See http://developer.apple.com/java/download/  # 
> Current Java version "1.6.0_26"
> For IronRuby: Install Mono >= 2.6
> For Ruby 1.9.3: Install libksba # If using Homebrew, 'brew install libksba'
> For Opal: Install Nodejs with NPM. See http://nodejs.org/download/
> 
> To use an RVM installed Ruby as default, instead of the system ruby:
> 
>     rvm install 1.8.7 # installs patch 357: closest supported version
>     rvm system ; rvm gemset export system.gems ; rvm 1.8.7 ; rvm gemset 
> import system.gems # migrate your gems
>     rvm alias create default 1.8.7
> 
> And reopen your terminal windows.
> 
> Xcode and gcc:
> 
> Right now Ruby requires gcc to compile, but Xcode 4.2 and later no longer 
> ship with gcc. Instead they ship with llvm-gcc (to which gcc is a symlink) 
> and clang, neither of which are supported for building Ruby. Xcode 4.1 was 
> the last version to ship gcc, which was /usr/bin/gcc-4.2.
> 
> Xcode 4.1 and earlier:
> - Ruby will build fine.
> 
> Xcode 4.2 and later (including Command Line Tools for Xcode):
> - If you have gcc-4.2 (and friends) from an earlier Xcode version, Ruby will 
> build fine.
> - If you don't have gcc-4.2, you have two options to get it:
>  * Install apple-gcc42 from Homebrew
>  * Install osx-gcc-installer
> 
>   Homebrew:
> 
>   If you are using Homebrew, you can install the apple-gcc42 and required 
> libraries from homebrew/dupes:
> 
>       brew update
>       brew tap homebrew/dupes
>       brew install autoconf automake apple-gcc42
>       rvm pkg install openssl
> 
>   Xcode 4.2+ install or/and Command Line Tools for Xcode is required to 
> provide make and other tools.
> 
>   osx-gcc-installer:
> 
>   If you don't use Homebrew, you can download and install osx-gcc-installer: 
> https://github.com/kennethreitz/osx-gcc-installer.
> 
>   Warning: Installing osx-gcc-installer on top of a recent Xcode is known to 
> cause problems, so you must uninstall Xcode before installing 
> osx-gcc-installer. Afterwards you may install Xcode 4.2+ or Command Line 
> Tools for Xcode if you desire.
> 
>   ** NOTE: Currently, Node.js is having issues building with 
> osx-gcc-installer. The only fix is to install Xcode over osx-gcc-installer.
> 
> Press 'q' to continue.
> ~
> (END) 
> Originally I had to get homebrew and
> 
> brew install libksba
> but I did that already and it works. That leads to "Xcode and gcc:" and 
> everything below it.
> 
> So, I have homebrew, and the following three commands work:
> 
>   brew update
>   brew tap homebrew/dupes
>   brew install autoconf automake apple-gcc42
> But when I try
> 
> rvm pkg install openssl
> this is what happens
> 
> Fetching openssl-1.0.1c.tar.gz to /Users/adamzerner/.rvm/archives
> Extracting openssl to /Users/adamzerner/.rvm/src/openssl-1.0.1c
> Configuring openssl in /Users/adamzerner/.rvm/src/openssl-1.0.1c.
> Compiling openssl in /Users/adamzerner/.rvm/src/openssl-1.0.1c.
> Error running 'make', please read /Users/adamzerner/.rvm/log/openssl/make.log
> 
> Please note that it's required to reinstall all rubies:
> 
>     rvm reinstall all --force
> 
> Updating openssl certificates
> Error running 'update_openssl_certs', please read 
> /Users/adamzerner/.rvm/log/openssl.certs.log
> And this is what happens when I try what it says...
> 
> Adam-Zerners-MacBook-Pro:~ adamzerner$ rvm reinstall all --force
> Adam-Zerners-MacBook-Pro:~ adamzerner$ 
> some other information...
> 
> I don't see a .rvm folder under adamzerner, so I can't read what it tells me 
> to (not that I would understand what I'd be reading anyway).
> 
> It seems that I have 1.8.7 installed:
> 
> Adam-Zerners-MacBook-Pro:~ adamzerner$ ruby -v
> ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
> So... to summarize... when I try to run
> 
> rvm install 1.9.3
> I get the gcc/Xcode problem. To fix that it says to download apple-gcc42 from 
> Homebrew. When I do that, I get a problem after doing
> 
> rvm pkg install openssl
> The problem being that I need to reinstall all rubies. When I do that:
> 
> rvm reinstall all --force
> it seems that nothing happens.
> 
> Thanks in advance to anyone willing to help me with this problem!
> 
> EDIT: I forgot to say this before. For the "long thing" up above, when I 
> press q to continue, this is what happens...
> 
> Searching for binary rubies, this might take some time.
> https://rvm.io/binaries/osx/10.8/x86_64/ruby-1.9.3-p327.tar.bz2 - #configure
> ruby-1.9.3-p327 - #download
> ruby-1.9.3-p327 - #extract
> ruby-1.9.3-p327 - #validate
> Libraries missing for ruby-1.9.3-p327: env. Refer to your system manual for 
> installing libraries
> Mounting remote ruby failed, trying to compile.
> Fetching yaml-0.1.4.tar.gz to /Users/adamzerner/.rvm/archives
> Extracting yaml to /Users/adamzerner/.rvm/src/yaml-0.1.4
> Configuring yaml in /Users/adamzerner/.rvm/src/yaml-0.1.4.
> Error running './configure --prefix=/Users/adamzerner/.rvm/usr', please read 
> /Users/adamzerner/.rvm/log/ruby-1.9.3-p327/yaml/configure.log
> Compiling yaml in /Users/adamzerner/.rvm/src/yaml-0.1.4.
> Error running 'make', please read 
> /Users/adamzerner/.rvm/log/ruby-1.9.3-p327/yaml/make.log
> Installing Ruby from source to: 
> /Users/adamzerner/.rvm/rubies/ruby-1.9.3-p327, this may take a while 
> depending on your cpu(s)...
> ruby-1.9.3-p327 - #downloading ruby-1.9.3-p327, this may take a while 
> depending on your connection...
> ruby-1.9.3-p327 - #extracted to /Users/adamzerner/.rvm/src/ruby-1.9.3-p327 
> (already extracted)
> ruby-1.9.3-p327 - #configuring
> Error running './configure --enable-shared --disable-install-doc 
> --prefix=/Users/adamzerner/.rvm/rubies/ruby-1.9.3-p327 
> --with-opt-dir=/Users/adamzerner/.rvm/usr', please read 
> /Users/adamzerner/.rvm/log/ruby-1.9.3-p327/configure.log
> There has been an error while running configure. Halting the installation.
> 
> what happens when you sudo ln -s /usr/bin/llvm-gcc-4.2 /usr/bin/gcc and re 
> run the ruby install? – Oliver Atkinson Dec 25 at 10:35
> Does the solution is this StackOverflow thread work for you? – Paul 
> Fioravanti Dec 25 at 11:35
> @OliverAtkinson is that all in one line? and should i type "usr" or 
> "adamzerner"? – Adam Zerner Dec 25 at 17:36 
> @Paul Floravanti I'm not sure. I don't understand what's going on there 
> enough, and I'm following a somewhat rigid rails tutorial and I'm not sure if 
> doing something it says there will negate/interfere with anything I've done 
> or will be doing in the tutorial. – Adam Zerner Dec 25 at 17:40 
> 1      
> @AdamZerner copy and paste exactly what I put - and yes its /usr/ – Oliver 
> Atkinson 2 days ago
> @OliverAtkinson when I copy and paste what you put and then re run the ruby 
> install, the same "long thing" comes up – Adam Zerner 2 days ago 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/rubyonrails-talk/-/52QM0KT6qFsJ.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to