title: Can't find the error...syntax error, unexpected keyword_ensure, expecting end-of-input
body: <p>New to Rails and getting this error: </p>
  
  <pre><code>    SyntaxError in RestaurantsController#index
  /home/action/workspace/yelp_demo/app/views/layouts/_navbar.html.erb:40: syntax error, unexpected keyword_ensure, expecting end-of-input
  </code></pre>
  
  <p>but the error, I think is here:</p>
  
  <pre><code>    app/views/layouts/application.html.erb:12:in `_app_views_layouts_application_html_erb___1775868341330703453_36033920'
  </code></pre>
  
  <p>So here's the application.html.erb code:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;Yelpdemo&lt;/title&gt;
    &lt;%= render 'layouts/bootstrap' %&gt;
    &lt;%= stylesheet_link_tag    "application", media: "all", "data-turbolinks-track" =&gt; true %&gt;
    &lt;%= javascript_include_tag "application", "data-turbolinks-track" =&gt; true %&gt;
    &lt;%= csrf_meta_tags %&gt;
  
   &lt;/head&gt;
  &lt;body&gt;
    &lt;%= render 'layouts/navbar' %&gt;
    &lt;div class="container-fluid"&gt;
    &lt;% flash.each do |name, msg| %&gt;
        &lt;% if msg.is_a?(String) %&gt;
          &lt;div class="alert alert-&lt;%= name == "notice" ? "success" : "danger" %&gt; alert-dismissable"&gt;
            &lt;button type="button" class="close" data-dismiss="alert"&gt;&lt;span aria-hidden="true"&gt;&amp;times;&lt;/span&gt;&lt;span class="sr-only"&gt;Close&lt;/span&gt;&lt;/button&gt;
            &lt;%= content_tag :div, msg, :id =&gt; "flash_#{name}" %&gt;
          &lt;/div&gt;
        &lt;% end %&gt;
      &lt;% end %&gt; 
      &lt;%= yield %&gt;
      &lt;%= render 'layouts/footer' %&gt;
    &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Here's my _navbar.html.erb:</p>
  
  <pre><code> &lt;nav class="navbar navbar-default" role="navigation"&gt;
    &lt;div class="container-fluid"&gt;
      &lt;!-- Brand and toggle get grouped for better mobile display --&gt;
      &lt;div class="navbar-header"&gt;
        &lt;button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"&gt;
          &lt;span class="sr-only"&gt;Toggle navigation&lt;/span&gt;
          &lt;span class="icon-bar"&gt;&lt;/span&gt;
          &lt;span class="icon-bar"&gt;&lt;/span&gt;
          &lt;span class="icon-bar"&gt;&lt;/span&gt;
        &lt;/button&gt;
        &lt;%= link_to "Yelpdemo", root_path, class: "navbar-brand" %&gt;
      &lt;/div&gt;
  
      &lt;!-- Collect the nav links, forms, and other content for toggling --&gt;
   &lt;div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1"&gt;
    &lt;ul class="nav navbar-nav"&gt;
      &lt;li&gt;&lt;%= link_to "About", pages_about_path %&gt;&lt;/li&gt;
      &lt;li&gt;&lt;%= link_to "Contact", pages_contact_path %&gt;&lt;/li&gt;
    &lt;/ul&gt;
    &lt;%= form_tag search_restaurants_path, method: :get, class: "navbar-form navbar-left" do %&gt;
        &lt;p&gt;
          &lt;%= text_field_tag :search, params[:search], class: "form-control" %&gt;
          &lt;%= submit_tag "Search", name: nil, class: "btn btn-default" %&gt;
        &lt;/p&gt;
    &lt;% end %&gt;
  &lt;% end %&gt;
      &lt;ul class="nav navbar-nav navbar-right"&gt;
  
          &lt;% if user_signed_in? %&gt;
            &lt;li&gt;&lt;%= link_to "Edit Profile", edit_user_registration_path %&gt;&lt;/li&gt;
            &lt;li&gt;&lt;%= link_to "Sign out", destroy_user_session_path, method: :delete %&gt;&lt;/li&gt;
          &lt;% else %&gt;
            &lt;li&gt;&lt;%= link_to "Sign up", new_user_registration_path %&gt;&lt;/li&gt;
            &lt;li&gt;&lt;%= link_to "Sign in", new_user_session_path %&gt;&lt;/li&gt;
          &lt;% end %&gt;
        &lt;/ul&gt;
      &lt;/div&gt;&lt;!-- /.navbar-collapse --&gt;
    &lt;/div&gt;&lt;!-- /.container-fluid --&gt;
  &lt;/nav&gt;
  </code></pre>
  
  <p>I'm sure I'm missing something here...but what? TIA for your help!!</p>