How to install Homebrew without upgrading ruby?
<p>My setting: Mac OS 10.7.5, ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin11.0].</p>

<p>I've tried installing Homebrew:</p>

<pre><code>/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
</code></pre>

<p>I get this message:</p>

<pre><code>-e:201: syntax error, unexpected '.', expecting $end
           .map { |d| File.join(HOMEBREW_PREFIX, d) }
            ^
</code></pre>

<p>I read that upgrading ruby may help. When I try to install rvm, this is what I did:</p>

<pre><code>gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
</code></pre>

<p>I get a message that gpg is not installed. I looked up how to install it, and it happens that I need Homebrew. Instead, I tried:</p>

<pre><code>\curl -sSL https://get.rvm.io | bash -s stable --ruby
</code></pre>

<p>It starts to install, but at some point it says</p>

<pre><code>About to install Homebrew, press `Enter` for default installation in `/usr/local`,
type new path if you wish custom Homebrew installation (the path needs to be writable for user)
: Requirements installation failed with status: 1.
</code></pre>

<p>Then I'm back to square one. To install Homebrew, I need a more recent ruby, for which I need rvm, for which I need Homebrew. I don't care about ruby, but if I need it for Homebrew, I'll upgrade it, but I don't see how to get off this circle of dependencies.</p>