How do I fix a syntax error in .bash_profile I was installing ruby on rails along with homebrew the other day and was following a step by step list of what to do. I now have this bash syntax error every time I enter the terminal:

-bash: /Users/briggsmcknight/.bash_profile: line 6: syntax error near unexpected token `source'
-bash: /Users/briggsmcknight/.bash_profile: line 6: `if which rbenv &gt; /dev/null; then eval "$(rbenv init -)"; fi source /Users/briggsmcknight/.bash_profile'


Could I get a small step by step breakdown of what I should do to fix this?
I believe the syntax error is by "fi" or "source", but do I just retype it again or what?
Edit the file with a GUI program e.g. TextEdit

Open TextEdit and select the home directory. .bash_profile is hidden so instead of a simple selection then you might have to hit CmdShift. to show .bash_profile When saving delete the .txt ending TextEdit adds or alter TextEdits's preferences.