Why does my brew installation not work? I installed brew before, but it does not work now.

When I run brew, it gives me the error -bash: brew: command not found

So I tried to reinstall using the code 

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


But it gives me another one :


  It appears Homebrew is already installed. If your intent is to reinstall you
  should do the following before running this installer again:
  rm -rf /usr/local/Cellar /usr/local/.git &amp;&amp; brew cleanup


If I use the command rm -rf /usr/local/Cellar /usr/local/.git &amp;&amp; brew cleanup, it gives back the first error : -bash: brew: command not found

What should I do now?
"Command not found" indicates that the brew binary isn't on one of the directories listed in your PATH environment variable. To check what your path is currently, run echo $PATH. By default, brew installs to /usr/local/bin. To set the path permanently, you should edit your ~/.bashrc file to contain the line export PATH="/usr/local/bin:$PATH".