Q:

Installing brew on Mac 10.6 results in syntax error

Running the following command from http://brew.sh/:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

...result in:

-e:192: syntax error, unexpected '.', expecting $end
                 .map { |d| File.join(HOMEBREW_PREFIX, d) }
                  ^

I'm using zsh on Mac OS 10.6.

A:

ok so to install manually through terminal do
$ cd /usr/local

$ mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew

then you need to change your bash_profile like this:
$ echo 'export PATH="/usr/local/homebrew/bin:$PATH"' >> ~/.bash_profile

you might need to change permissions to the homebrew folder as well:
$ sudo chown -R $(whoami) /usr/local/homebrew

this worked for me

A:

The official homebrew install command use some bashism. The easiest way to solve this is to run the homebrew install command with bash -c in front of it :
bash -c '/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"'

