`brew doctor` gives warning for newly opened terminal windows
Edit your PATH variable in your ~/.profile (assuming you have not changed your default login shell).
There should be something like this:

export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin


change it so that /usr/local/bin in before /usr/bin.

If you do not have a ~/.profile (or it is empty) type the following:

echo 'export PATH=$PATH' &gt;&gt; ~/.profile,


Make certain that you use &gt;&gt; instead of one &gt;. 

Now edit the ~/.profile like described before.