title: Rails 4 Runtime error in controller: Circular dependency detected while autoloading constant
body: <p>Let me know if I left anything out. I can't figure out why my views/references/ folder isn't accessible. neither <code>new.html.erb</code> nor <code>index.html.erb</code> is available. When I go to <code>localhost:3000/references</code> my error is:</p>
  
  <pre><code>RuntimeError in ReferencesController#index
  Circular dependency detected while autoloading constant ReferencesController
  </code></pre>
  
  <p>I believe this is setup, and It shouldn't be a Rails issue because my other controllers are working fine.</p>
  
  <p>My routes file has <code>resources :references</code> in it, my rake routes produces:</p>
  
  <pre><code>references GET    /references(.:format)          references#index
             POST   /references(.:format)          references#create
  new_reference GET    /references/new(.:format)      references#new
  edit_reference GET    /references/:id/edit(.:format) references#edit
  reference GET    /references/:id(.:format)      references#show
             PATCH  /references/:id(.:format)      references#update
             PUT    /references/:id(.:format)      references#update
             DELETE /references/:id(.:format)      references#destroy
  </code></pre>
  
  <p>So I try to get to my index page by this which should be the correct path.</p>
  
  <pre><code>&lt;%= link_to 'References', references_path, class: 'navbar-brand' %&gt;
  </code></pre>
  
  <p>My model:</p>
  
  <pre><code>class Reference &lt; ActiveRecord::Base
    belongs_to :user
  end
  </code></pre>
  
  <p>My controller:</p>
  
  <pre><code>class ReferencesControllers &lt; ApplicationController
    def index
      @references = Reference.all
    end
  </code></pre>
  
  <p>After Google searching, every similar problem seems to be when upgrading from Rails 3 to Rails 4, or updating from OS to mavericks. My other controllers work so I feel it's safe to rule those out. I can't even get to the templates.</p>