Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undefined method `<' error when attempting to install homebrew

So I'm trying to install homebrew on my Macbook Pro in order to be able to run NINJA-IDE, and every time I execute the code that is given on the site I get this:

Joshs-MacBook-Pro:~ joshua$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
==> This script will install:
/usr/local/bin/brew
/usr/local/Library/...
/usr/local/share/man/man1/brew.1
==> The following directories will be made group writable:
/usr/local/share
==> The following directories will have their group set to admin:
/usr/local/share

Press ENTER to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/share
Password:
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/share
==> Downloading and Installing Homebrew...


Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.


-e:84:in `git': undefined method `<' for nil:NilClass (NoMethodError)
    from -e:153:in `block in <main>'
    from -e:152:in `chdir'
    from -e:152:in `<main>'
Joshs-MacBook-Pro:~ joshua$

I've also thoroughly researched the line that says to "re-run as root via sudo" to no avail, so I'm assuming the issue lies with the NoMethodError that I keep seeing. Any help with this will be very much appreciated!

like image 427
Josh Spern Avatar asked Oct 08 '13 03:10

Josh Spern


1 Answers

Install XCode via the App Store if you haven't yet. Then run it, and accept the license via the GUI. Now run the Homebrew install script again. This fixed the problem for me.

like image 94
Richard Kuo Avatar answered Oct 01 '22 07:10

Richard Kuo