title: routes.rb - Controller name not supported
body: <p>I'm having quite a peculiar issue. This is the portion of routes.rb it relates to:</p>
  
  <pre><code>resources :players
  match '/players/:userid', :to =&gt; 'Players#show'
  </code></pre>
  
  <p>When you visit localhost:3000/players/1234 it gives this error:</p>
  
  <blockquote>
    <p>'Players' is not a supported controller name. This can lead to potential routing problems. </p>
  </blockquote>
  
  <p>The related code in the controller: </p>
  
  <pre><code>def show
    begin
      if Player.find_by(:uid =&gt; :userid) then
        @playerattributes = Player.find_by(:uid =&gt; :userid) 
        if player[:profile_complete] == true then
          @playerinfo = {
              :age =&gt; player[:age],
              :team =&gt; player[:team],
              :position =&gt; player[:position]
          }
        else
          @playerinfo = 0 
        end
      end
      player = Player.find_by(:uid =&gt; :userid)[:info]
  rescue ActiveRecord::RecordNotFound
      redirect_to root_url        
      end
  end
  </code></pre>
  
  <p>The problem doesn't end there. When the page does load (which it sometimes randomly works), this line acts up:
  <code>if Player.find_by(:uid =&gt; :userid) then</code>
  Using PostgreSQL, and the query gets displayed. Instead of using the :userid value from the URL (i.e. localhost:3000/players/1234 would be 1234), it just inputs the text "userid".</p>
  
  <p>Am I missing something obvious? </p>
  
  <p>Really appreciate any help.</p>