Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>This answer was edited multiple times and now contains several <em>alternative</em> solutions. Try the simple “Edit 3” solution first.</p> </blockquote> <p><a href="http://www.ruby-lang.org/en/news/2012/02/16/ruby-1-9-3-p125-is-released/" rel="noreferrer">Ruby 1.9.3-p125 and later have official support for clang</a>, so if you are installing such a version you should not need GCC. If you’re installing an older version of Ruby, read on.</p> <p>To compile Ruby with GCC, you need a non-LLVM version of GCC, which is no longer included with XCode 4.2. Install it yourself (or downgrade to XCode 4.1 temporarily), then do <code>CC=/usr/local/bin/gcc-4.2 rvm install 1.9.3 --enable-shared</code> (substituting the path to your non-LLVM gcc).</p> <p>Edit: <a href="https://github.com/kennethreitz/osx-gcc-installer/downloads" rel="noreferrer">https://github.com/kennethreitz/osx-gcc-installer/downloads</a> may help for installing GCC. There is also some info available by running <code>rvm requirements</code>.</p> <p>Edit 2: For an easier solution, you can try adding <code>--with-gcc=clang</code> to the arguments to <code>configure</code> for Ruby to use clang instead of GCC.</p> <p><strong>Edit 3</strong>: <code>rvm install 1.9.3 --with-gcc=clang</code> does that for you.</p> <p>Note: With current versions of XCode you need to install the command-line tools separately from the XCode menu -> Preferences -> Downloads -> Components. This is a pre-requisite for doing any compiling with XCode on the command-line, not just Ruby.</p> <p>Note 2: If something doesn't work after following the steps, try doing a reboot or re-login to ensure that the environment gets set correctly.</p> <p>Note 3: Ruby versions prior to 1.9.3-p125 may not always be fully compatible with clang, so test your software thoroughly if using the “edit 3” solution in a production environment.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload