Undefined method `<' error when attempting to install homebrew
Asked Answered
K

2

9

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!

Kildare answered 8/10, 2013 at 3:22 Comment(0)
S
24

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.

Southwestwardly answered 22/10, 2013 at 23:20 Comment(0)
P
3

Just installed XCode new and never opened.Turns out you have to agree the license before working with Homebrew scripts. Run XCode by itself and agree the license that should solve your problem.

Perceptive answered 18/4, 2014 at 10:9 Comment(1)
this can be done also in a terminal by running the following command line: sudo xcrun ccFurcate

© 2022 - 2024 — McMap. All rights reserved.