First, open a terminal session and run:
cd /usr/local/
git status
to see if Homebrew is clean.
If it's dirty, run:
git reset --hard && git clean -df
then
brew doctor
brew update
If it's still broken, try this in your session:
sudo rm /System/Library/Frameworks/Ruby.framework/Versions/Current
sudo ln -s /System/Library/Frameworks/Ruby.framework/Versions/1.8 /System/Library/Frameworks/Ruby.framework/Versions/Current
This will force Homebrew to use Ruby 1.8 from the system's installation.