After installing Yosemite, I was unable to run brew or ruby.
I was getting this error on brew update:
/usr/local/bin/brew: /usr/local/Library/brew.r
As an example I kept getting
$ sudo ln -s Current 1.8
$ brew update
/usr/local/Library/brew.rb:18:in ': undefined method help?’ for [“update”]:Array (NoMethodError)
I just get this…(no matter what command just switch out “update” with the command)
I solved the problem by asking for a buddies /usr/local
folder. I then made a backup of my /usr/local
folder.
sudo mv /usr/local /usr/local.orig
I then moved his /usr/local
to mine
sudo mv ~/Downloads/local /usr/local
Note: You will likely lose some data so make sure to make a backup.