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
Like the one before said: 1) Change to current 2) install xcode 6
If you now have further problems with brew and ruby this should help: Somehow brew needs ruby on version 1.8, so create the folder:
sudo mkdir -p /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin
and make a symlink:
sudo ln -s /usr/bin/ruby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby