Install Ruby with Mountain Lion, Xcode 4.5 and RVM?

rvm install 1.9.3 --with-gcc=clang(as suggested Cannot install Ruby under Lion with RVM-GCC problems ) does not work, because neither Mac OS X 10.8.2 (Mountain Lion), but Xcode 4.5 comes with clang.

Is it possible to compile Ruby with llvm?

According to Matthias Schmidt, β€œHow to Install Ruby 1.9.3 on Mac OS X with LLVM and rbenv,” Ruby is now fully compatible with LLVM.

But I still get: error: C compiler cannot create executables

UPDATE:

Actually, I found clanghere /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang(thanks to the Node.js Installation Wiki ). I just didn't have it clangin my way.

So, if I add clangto my path, rvm install 1.9.3 --with-gcc=clangenough?

+5
source share
3 answers

no, ruby ​​is not fully compatible with llvm, there is at least one problem with Fibers, and other problems may arise if the version of llvm changes.

Ruby works best with gcc-4.2, rvm provides information on how to get it (+ other important things):

rvm requirements
+3
source

From RVM notes:

Homebrew

If you use Homebrew , you can install apple-gcc42 and the necessary libraries from homebrew / dupes:

  brew update
  brew tap homebrew/dupes
  brew install autoconf automake apple-gcc42
  rvm pkg install openssl

It can live side by side with an existing installation of Xcode 4.2 + or the command line for Xcode.

OSX-GCC installer

If you are not using Homebrew, you can download and install osx-gcc-installer:
  https://github.com/kennethreitz/osx-gcc-installer .

Hope this helps you.

+12
source

I used this: http://railsinstaller.org/mac - and it was a BREEZE. I also like the sublime text editor that found that through this resource ... Maybe I'll say goodbye to macvim! Imagine that.

0
source

All Articles