title: `require': cannot load such file -- ./controllers/<controller> (LoadError) with Rspec
body: <p>I'm trying to run a test file for a controller, but I'm running into this error:</p>
  
  <blockquote>
    <p>/home/mariana/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in `require': cannot load such file -- ./controllers/users_controller
    (LoadError)</p>
  </blockquote>
  
  <p>I think rspec can't find the actual files it's supposed to test.</p>
  
  <p>The test file, <code>users_controller_spec.rb</code>:</p>
  
  <pre><code>require 'rails_helper'
  require './controllers/users_controller'
  
  describe UsersController do
    describe '#create' do
        ...
    end
  end
  </code></pre>
  
  <p>The header/preamble of <code>rails_helper.rb</code>, that deals with file paths (I think):</p>
  
  <pre><code>ENV['RAILS_ENV'] ||= 'test'
  require File.expand_path('../../config/environment', __FILE__)
  abort("The Rails environment is running in production mode!") if Rails.env.production?
  require 'spec_helper'
  require 'rspec/rails'
  </code></pre>
  
  <p>The section of the Gemfile that deals with rspec and development/test-specific stuff:</p>
  
  <pre><code>group :development, :test do
    gem 'spring'
    gem 'rspec', '~&gt;3.5'
    gem 'rspec-rails', '~&gt;3.5' 
  end
  </code></pre>
  
  <p>The project tree:</p>
  
  <pre><code>   -&gt;project
        -&gt;app
          -&gt;controllers
            -&gt;users_controller.rb
        -&gt;spec
          -&gt;controllers
            -&gt;users_controller_spec.rb
          -&gt;rails_helper.rb
          -&gt;spec_helper.rb
  </code></pre>
  
  <p>I've tried messing around with the <code>require File.expand_path(...)</code> line on <code>rails_helper.rb</code>. I also tried adding the <code>rspec</code> gem to the Gemfile alongside <code>rspec-rails</code> (the problem also existed when it was just <code>rspec-rails</code>).</p>
  
  <p>Any suggestions?</p>