Benjamints
Benjamints

Reputation: 849

syntax error, unexpected end-of-input, expecting keyword_end

I have really tried to find out where I haven't closed some code but it all seems right to me. What have I done? I have checked all of the code carefully and hope someone can solve this for me!!!

 <nav class="navbar navbar-default" role="navigation">
  <div class="container">
  <!-- Brand and toggle get grouped for better mobile display -->
  <div class="navbar-header">
    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
      <span class="sr-only">Toggle navigation</span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
    </button>
    <%= link_to "Pinteresting", root_path, class: "navbar-brand" %>
  </div>


  <!-- Collect the nav links, forms, and other content for toggling -->
  <div class="collapse navbar-collapse navbar-ex1-collapse">
    <ul class="nav navbar-nav navbar-right">
      <li><%= link_to "Home", root_path %></li>
      <li><%= link_to "About", about_path %></li>
      <% if user_signed_in? %>
      <li><%= link_to "Account Settings", edit_user_registration_path %></li> 
      <li><%= link_to "Log out", destroy_user_session_path, method: :delete %></li> 
      <% else %>
      <li><%= link_to "Sign in", new_user_session_path %></li>
  </ul>

    </div>
  </div><!-- /.navbar-collapse -->

</nav>

Upvotes: 0

Views: 418

Answers (1)

Oleksandr Avoiants
Oleksandr Avoiants

Reputation: 1929

There is missed <% end %>:

<nav class="navbar navbar-default" role="navigation">
  <div class="container">
  <!-- Brand and toggle get grouped for better mobile display -->
  <div class="navbar-header">
    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
      <span class="sr-only">Toggle navigation</span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
    </button>
    <%= link_to "Pinteresting", root_path, class: "navbar-brand" %>
  </div>


  <!-- Collect the nav links, forms, and other content for toggling -->
  <div class="collapse navbar-collapse navbar-ex1-collapse">
    <ul class="nav navbar-nav navbar-right">
      <li><%= link_to "Home", root_path %></li>
      <li><%= link_to "About", about_path %></li>
      <% if user_signed_in? %>
        <li><%= link_to "Account Settings", edit_user_registration_path %></li> 
        <li><%= link_to "Log out", destroy_user_session_path, method: :delete %></li> 
      <% else %>
        <li><%= link_to "Sign in", new_user_session_path %></li>
      <% end %>
  </ul>

    </div>
  </div><!-- /.navbar-collapse -->

</nav>

Upvotes: 1

Related Questions