title: Rails: syntax error, unexpected keyword_ensure, expecting $end
body: <p>I'm creating a very basic rails app (learning tutorial) and can't understand why I'm getting this error. I've tried troubleshooting but to no avail. </p>
  
  <p>My code:</p>
  
  <pre><code>&lt;ul class = "nav pull-right"&gt;
    &lt;% if user_signed_in? %&gt;
      &lt;li&gt;&lt;%= link_to current_user.full_name, edit_user_registration_path %&gt;&lt;/li&gt;
      &lt;li&gt;&lt;%= link_to "Log Out", destroy_user_session_path, method: :delete %&gt;&lt;/li&gt;
    &lt;% end %&gt; 
  
    &lt;% else %&gt;
  
      &lt;li&gt;&lt;%= link_to "Log In", new_user_session_path %&gt;&lt;/li&gt;
      &lt;li&gt;&lt;%= link_to "Sign Up", new_user_registration_path %&gt;&lt;/li&gt;
    &lt;%end%&gt;
  
  &lt;/ul&gt;
  </code></pre>
  
  <p>Everything was working fine, until I added the Else statement, but no idea what my error is - I'm sure it's a very minor syntax fix, but your help would be much appreciated.</p>