Ruby -e does not execute the code in the argument
The " around the link are unnecessary, but there is one " missing at the end. Try

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"


or just copy/paste from Homebrew.