Ruby -e does not execute the code in the argument

homebrewrubyterminal

I am running Mac OS High Sierra v10.13.2 on a MacBook Pro (Retina, Mid 2012). My Ruby version (output from >ruby -v) is ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17].
When I am trying to install Homebrew using the following command:

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

the command returns a prompt ">", and nothing happens. When I try running the curl command, it executes properly and displays the Homebrew install scipt.

How do I get the entire "ruby -e …" command to execute properly and install Homebrew?

Best Answer

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.