-2

Im trying to install ruby 1.9.3 and this code keeps going on. i already installed libksba, but cant go throu please hel me out

 MarioVMtz$ rvm install ruby-1.9.3-p362

  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.
:
halfelf
  • 9,737
  • 13
  • 54
  • 63
  • It is really hard to understand what you are asking because your text is mixed with what could be code responses. Please take the time to reformat your question using the built-in [Markdown formatting options](http://stackoverflow.com/editing-help), and remove non-essential text. Include any error messages you received. – the Tin Man Dec 26 '12 at 17:18
  • Have you read "[How can I install Ruby 1.9.3 in Mac OS X Lion?](http://stackoverflow.com/questions/8139138/how-can-i-install-ruby-1-9-3-in-mac-os-x-lion)" and did it help? – the Tin Man Dec 26 '12 at 17:22
  • I have seen several questions about installing Ruby with RVM on OS X these last days. Please check http://stackoverflow.com/questions/14022151/installing-ruby-via-rvm-fails-to-configure/14037035#comment19402808_14037035 and more backwards. I have installed several rubies with RVM on Mountain Lion a few months ago. It was not as easy as the doc claims. Unfortunately I don't remember what I had to do to have it work. Xcode 4.1 ??? No memories. Good luck. – user1852994 Dec 26 '12 at 17:23
  • See also http://stackoverflow.com/questions/14045359/cant-install-ruby-on-mountain-lion-with-rvm – user1852994 Dec 26 '12 at 23:41

1 Answers1

0

I finally made the installation work on (fresh) Mac OsX 10.8.2. The main problem is ruby cannot be compiled without gcc, even gcc4.2 does exist in the system.

First you have to check your gcc version

$ gcc --version
    i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00)
    Copyright (C) 2007 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

You should get the latest rvm as well

$ rvm get latest

Now, point the gcc compiler to to the rvm, so rvm can use it to compile ruby

$ CC=/usr/bin/gcc rvm install 1.9.3 
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p374.
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies.
Fetching yaml-0.1.4.tar.gz to /Users/bubuzzz/.rvm/archives
Extracting yaml to /Users/bubuzzz/.rvm/src/yaml-0.1.4
Configuring yaml in /Users/bubuzzz/.rvm/src/yaml-0.1.4.
Compiling yaml in /Users/bubuzzz/.rvm/src/yaml-0.1.4.
Installing yaml to /Users/bubuzzz/.rvm/usr
Building 'ruby-1.9.3-p374' using clang - but it's not (fully) supported, expect errors.
Installing Ruby from source to: /Users/bubuzzz/.rvm/rubies/ruby-1.9.3-p374, this may take a while depending on your cpu(s)...
ruby-1.9.3-p374 - #downloading ruby-1.9.3-p374, this may take a while depending on your connection...
ruby-1.9.3-p374 - #extracted to /Users/bubuzzz/.rvm/src/ruby-1.9.3-p374 (already extracted)
ruby-1.9.3-p374 - #configuring
ruby-1.9.3-p374 - #compiling
ruby-1.9.3-p374 - #installing 
Retrieving rubygems-1.8.25
######################################################################## 100.0%
Extracting rubygems-1.8.25 ...
Removing old Rubygems files...
Installing rubygems-1.8.25 for ruby-1.9.3-p374 ...
Installation of rubygems completed successfully.
Saving wrappers to '/Users/bubuzzz/.rvm/bin'.
ruby-1.9.3-p374 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
ruby-1.9.3-p374 - #importing default gemsets, this may take time ...
Install of ruby-1.9.3-p374 - #complete 
Ruby 'ruby-1.9.3-p374' was built using clang - but it's not (fully) supported, expect errors.

There is a small issue (the warning message) at the end of installation, but at least, ruby is working now

$ ruby --version
ruby 1.9.3p374 (2013-01-15 revision 38858) [x86_64-darwin12.2.1]

Cheers

Thai Tran
  • 9,815
  • 7
  • 43
  • 64