Rails URL Generation Error but route exists
<p>Making a basic phonebook app and made some changes while figuring out the has_many and belongs_to relationships. I must have broke something because I have no idea why I'm getting this error. When I access my root, I get the following--></p>

<pre><code>ActionController::UrlGenerationError in ContactsController#index
No route matches {:action=&gt;"show", :controller=&gt;"contacts"} missing required keys: [:id]
</code></pre>

<p>The error shows mistakes in lines:</p>

<pre><code>app/views/contacts/index.html.erb:10:in `block in _app_views_contacts_index_html_erb___2771775118522806317_70170309989460'
app/views/contacts/index.html.erb:7:in `_app_views_contacts_index_html_erb___2771775118522806317_70170309989460'
</code></pre>

<p>This is my contacts/index.html.erb</p>

<pre><code>&lt;p id="notice"&gt;&lt;%= notice %&gt;&lt;/p&gt;

&lt;% if user_signed_in? %&gt;

  &lt;h1&gt;Listing Contacts&lt;/h1&gt;
    &lt;% @contacts = current_user.contacts %&gt;
      &lt;% @contacts.each do |contact| %&gt;
        &lt;div class="link row clearfix"&gt;
          &lt;h2&gt;
            &lt;%= link_to contact.name, contact_path %&gt; 
          &lt;/h2&gt;
        &lt;/div&gt;
       &lt;% end %&gt;
    &lt;% end %&gt;
    &lt;%= link_to "New Contact", new_contact_path %&gt;

&lt;% else %&gt;
  &lt;h5&gt; Welcome. Make an account or sign in above! &lt;/h5&gt;
&lt;% end %&gt;
</code></pre>

<p>This is my config/routes</p>

<pre><code>Rails.application.routes.draw do
  resources :controllers
  devise_for :users 

  resources :contacts so
    resources :numbers
  end
end
end
</code></pre>

<p>This is my contacts/show.html.erb</p>

<pre><code>&lt;div class="page-header"&gt;
  &lt;h1&gt;&lt;a href="&lt;%= @contact.name %&gt;"&gt;&lt;%= @contact.name %&gt;&lt;/a&gt;&lt;br&gt; &lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;
  &lt;strong&gt;Name:&lt;/strong&gt;
  &lt;%= @contact.name %&gt;
&lt;/p&gt;

&lt;p&gt;
  &lt;strong&gt;Email:&lt;/strong&gt;
  &lt;%= @contact.email %&gt;
&lt;/p&gt;

&lt;br&gt;
&lt;%= link_to 'Edit', edit_contact_path(@contact) %&gt; |
&lt;%= link_to 'Back', contacts_path %&gt;
</code></pre>

<p>The output of my rake routes:</p>

<pre><code>contacts GET    /contacts(.:format)             contacts#index
                         POST   /contacts(.:format)             contacts#create
             new_contact GET    /contacts/new(.:format)         contacts#new
            edit_contact GET    /contacts/:id/edit(.:format)    contacts#edit
                 contact GET    /contacts/:id(.:format)         contacts#show
                         PATCH  /contacts/:id(.:format)         contacts#update
                         PUT    /contacts/:id(.:format)         contacts#update
                         DELETE /contacts/:id(.:format)         contacts#destroy
</code></pre>

<p>As you can see, I have a route for contacts#show so that's not the mistake. I'm unclear as to what it could be. Any ideas?</p>