This error can easily be fixed in the following steps:
1) Open terminal
2) Type nano /usr/local/Library/brew.rb
3) In the first line change “1.8″ to “Current”, so it should look like this:
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby -W0
via http://blog.ic3man.gr/2014/06/homebrew-ruby-bad-interpreter-no-such-file-or-directory/