I found this while trying to figure out why I’m getting the error.
1. open your ~/.bash_profile,
if you use textmate it would be :
$ sudo mate ~/.bash_profile
2. add this line to the file:
3. Save & close the file and type on the terminal:
$ source ~/.bash_profile
*All* the credits go to these guys: