title: Bash error when opening terminal
body: <p>I recently installed Ruby on my mac using this following command:</p>
  
  <pre><code>brew install rbenv ruby-build
  </code></pre>
  
  <p>I was then instructed to enter this command to add rbenv to bash so it loads every time the terminal is open:</p>
  
  <pre><code># Add rbenv to bash so that it loads every time you open a terminal
  echo 'if which rbenv &gt; /dev/null; then eval "$(rbenv init -)"; fi' &gt;&gt; ~/.bash_profile
  source ~/.bash_profile
  </code></pre>
  
  <p>Now, everytime I open the terminal I get this error:</p>
  
  <pre><code>Last login: Sun Sep  6 17:30:09 on ttys000
  -bash: /Users/pw/.bash_profile: line 1: syntax error near unexpected token `source'
  -bash: /Users/pw/.bash_profile: line 1: `if which rbenv &gt; /dev/null; then eval "$(rbenv init -)"; fi source /Users/pw/.bash_profile'
  </code></pre>
  
  <p>Any ideas to how I can stop this error from showing?</p>
  
  <p>Thanks</p>