title: Getting Ruby 1.8.7 installed on Mountain Lion (10.8)
body: <p>I'm having a lot of trouble getting Ruby 1.8.7 installed on my clean install of Mountain Lion. I've looked around on Stack Overflow and don't see anything that specifically addresses this issue and hope that someone might have encountered this before.</p>
  
  <p><strong>I'm using the command line tools that can be downloaded with Xcode</strong></p>
  
  <p>I haven't had any problems installing Ruby 1.9.3 via RVM and HomeBrew. When I try to install 1.8.7 I get the following message after it tries to compile: </p>
  
  <p>I first ran the command</p>
  
  <pre><code>rvm install 1.8.7
  </code></pre>
  
  <p>This gave me this error</p>
  
  <pre><code>The provided compiler '/usr/bin/gcc' is LLVM based, it is not yet fully supported by ruby and gems, please read `rvm requirements`.
  </code></pre>
  
  <p>After digging around a bit I tried </p>
  
  <pre><code>rvm install 1.8.7 --with-gcc=clang
  
  Error running 'make ', please read /Users/paulzaich/.rvm/log/ruby-1.8.7-p370/make.log
  There has been an error while running make. Halting the installation.
  Ruby 'ruby-1.8.7-p370' was built using clang - but it's not (fully) supported, expect errors.
  Please be aware that you just installed a ruby that requires        2 patches just to be compiled on up to date linux system.
  This may have known and unaccounted for security vulnerabilities.
  Please consider upgrading to Ruby 1.9.3-194 which will have all of the latest security patches.
  </code></pre>
  
  <p>At this point I did some more searching and found something about needing compile my own readline. <a href="https://stackoverflow.com/questions/5671074/rvm-does-not-install-ruby-1-9-2-on-snow-leopard-error-running-make">RVM Does Not Install Ruby 1.9.2 on Snow Leopard: &#39;Error running &#39;make &#39;</a></p>
  
  <p>This unfortunately seemed to corrupt my entire rvm install including 1.9.3. I tried to reinstall 1.9.3 and got the same errors I as I was getting with 1.8.7. I completely deleted RVM at this point and reinstalled. Had no problem installing 1.9.3 again.</p>
  
  <p>I also tried updating all versions of rvm based off of this post <a href="https://stackoverflow.com/questions/12117626/rvm-issue-with-mountain-lion">RVM issue with Mountain Lion</a>. No luck there either. </p>
  
  <p><strong>Update:</strong> I also tried using <a href="http://coderwall.com/p/fywjrw" rel="nofollow noreferrer">this walkthrough</a> for REE 1.8.7 which recommended installing gcc-4.2. No luck unfortunately. </p>
  
  <p><strong>Update 2:</strong> I reference rvm requirements and installed the following packages</p>
  
  <pre><code>brew update
  brew tap homebrew/dupes 
  brew install autoconf automake apple-gcc42 
  rvm pkg install openssl
  </code></pre>
  
  <p>So far so good. Then I referenced <a href="https://stackoverflow.com/questions/6170813/why-cant-i-install-rails-on-lion-using-rvm">this post</a> on needing to reference the GCC compiler. I determined that the links referenced might not be correct because I'm using homebrew? I found the compiler in my Cellar folder and used the following command</p>
  
  <pre><code>CC=/usr/local/Cellar/apple-gcc42/4.2.1-5666.3/bin/gcc-4.2 rvm install 1.8.7
  </code></pre>
  
  <p>No luck. Same error messages as before.</p>