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
Steps to fix it:
Install command line tools for Xcode 6
Reinstall brew:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Once brew is installed, rvm will work:
rvm install ruby
Worked for me, yahoo!