title: No route matches controller show - scaffold generated code
body: <p>I started a Rails app using scaffold. The app relates people to institutions. When I go to </p>
  
  <p><a href="http://localhost:3000/people" rel="noreferrer">http://localhost:3000/people</a></p>
  
  <p>I get the following error:</p>
  
  <pre><code>No route matches {:controller=&gt;"people", :action=&gt;"show", :id=&gt;#&lt;Person pid: 302, name: 
  </code></pre>
  
  <p>(and so on)</p>
  
  <p>If I remove all the "link_to" cells in the scaffold-generated table, the page loads just fine. This error happens for all the index.html.erb files in my app.</p>
  
  <p>Here's my people/index.html.erb</p>
  
  <pre><code>&lt;h1&gt;Listing people&lt;/h1&gt;
  
  &lt;table&gt;   &lt;tr&gt;  &lt;th&gt;&lt;/th&gt;
      &lt;th&gt;&lt;/th&gt;
      &lt;th&gt;&lt;/th&gt;
      &lt;th&gt;&lt;/th&gt;   &lt;/tr&gt;
  
  &lt;% @people.each do |person| %&gt;   &lt;tr&gt;   &lt;td&gt;&lt;%= person.name %&gt;&lt;/td&gt;
      &lt;td&gt;&lt;%= link_to 'Show', person %&gt;&lt;/td&gt;
      &lt;td&gt;&lt;%= link_to 'Edit', edit_person_path(person) %&gt;&lt;/td&gt;
      &lt;td&gt;&lt;%= link_to 'Destroy', person, :confirm =&gt; 'Are you sure?', :method
  =&gt; :delete %&gt;&lt;/td&gt;   &lt;/tr&gt; &lt;% end %&gt; &lt;/table&gt;
  
  &lt;br /&gt;
  
  &lt;%= link_to 'New Person', new_person_path %&gt;
  </code></pre>
  
  <p>And the beginning of my controllers/people.rb </p>
  
  <pre><code>class PeopleController &lt; ApplicationController
    # GET /people
    # GET /people.xml
    def index
      @people = Person.all(:order =&gt; "year_grad, name")
  
      respond_to do |format|
        format.html # index.html.erb
        format.xml  { render :xml =&gt; @people }
      end
    end
  
    # GET /people/1
    # GET /people/1.xml
    def show
      @person = Person.find(params[:id])
  
      respond_to do |format|
        format.html # show.html.erb
        format.xml  { render :xml =&gt; @person }
      end
    end
  </code></pre>
  
  <p>and the results of rake routes</p>
  
  <pre><code>people GET    /people(.:format)                {:controller=&gt;"people", :action=&gt;"index"}
  POST   /people(.:format)                {:controller=&gt;"people", :action=&gt;"create"}
  new_person GET    /people/new(.:format)            {:controller=&gt;"people", :action=&gt;"new"}
  edit_person GET    /people/:id/edit(.:format)       {:controller=&gt;"people", :action=&gt;"edit"}
  person GET    /people/:id(.:format)            {:controller=&gt;"people", :action=&gt;"show"}
  PUT    /people/:id(.:format)            {:controller=&gt;"people", :action=&gt;"update"}
  DELETE /people/:id(.:format)            {:controller=&gt;"people", :action=&gt;"destroy"}
  home_index GET    /home/index(.:format)            {:controller=&gt;"home", :action=&gt;"index"}
  root        /(.:format)                      {:controller=&gt;"home", :action=&gt;"index"}
  </code></pre>
  
  <p>and the migration for people</p>
  
  <pre><code>class CreatePeople &lt; ActiveRecord::Migration
    def self.up
      create_table :people, :id =&gt; false, :primary_key =&gt; :pid do |t|
        t.integer :pid, :null =&gt;false
        t.string :name
        t.string :degree
        t.integer :phd_area
        t.string :thesis_title
        t.integer :year_grad
        t.integer :instid_phd
        t.integer :year_hired
        t.integer :instid_hired
        t.integer :schoolid_hired
        t.integer :deptid_hired
        t.string :email
        t.string :notes
        t.integer :hire_rankid
        t.integer :tenure_track
        t.integer :prev_instid
        t.integer :prev_rankid
      end
    end
  
    def self.down
      drop_table :people
    end
  end
  </code></pre>
  
  <p>and here is my routes.rb file (minus the commented lines that scaffolding automatically generates):</p>
  
  <pre><code>IHiring::Application.routes.draw do
    resources :ranks, :departments, :institutions, :schools, :people
  
    get "home/index"
    root :to =&gt; "home#index"
  
  end
  </code></pre>
  
  <p>Does it have something to do with setting a different primary_key for the table? I'm not sure if it's a model or routes problem. Or something I haven't thought of. I did restart my rails server after scaffolding.</p>