title: Given a typical Rails 3 environment, why am I unable to execute any tests?
body: <p>I'm working on writing simple unit tests for a Rails 3 project, but I'm unable to actually execute any tests.</p>
  
  <p>Case in point, attempting to run the test auto-generated by Rails fails:</p>
  
  <pre><code>require 'test_helper'
  
  class UserTest &lt; ActiveSupport::TestCase
    # Replace this with your real tests.
    test "the truth" do
      assert true
    end
  end
  </code></pre>
  
  <p>Results in the following error:</p>
  
  <pre><code>&lt;internal:lib/rubygems/custom_require&gt;:29:in `require': no such file to load --
  test_helper (LoadError)
          from &lt;internal:lib/rubygems/custom_require&gt;:29:in `require'
          from user_test.rb:1:in `&lt;main&gt;'
  </code></pre>
  
  <p>Commenting out the require 'test_helper' line and attempting to run the test results in this error:</p>
  
  <pre><code>user_test.rb:3:in `&lt;main&gt;': uninitialized constant Object::ActiveSupport (NameError)
  </code></pre>
  
  <p>The action pack gems appear to be properly installed and up to date:</p>
  
  <pre><code>actionmailer (3.0.3, 2.3.5)
  actionpack (3.0.3, 2.3.5)
  activemodel (3.0.3)
  activerecord (3.0.3, 2.3.5)
  activeresource (3.0.3, 2.3.5)
  activesupport (3.0.3, 2.3.5)
  </code></pre>
  
  <p>Ruby is at 1.9.2p0 and Rails is at 3.0.3.</p>
  
  <p>The sample dump of my test directory is as follows:</p>
  
  <pre><code>/fixtures
  /functional
  /integration
  /performance
  /unit
  -- /helpers
     -- user_helper_test.rb
  -- user_test.rb
  test_helper.rb
  </code></pre>
  
  <p>I've never seen this problem before - I've run the typical rake tasks for preparing the test environment. I have nothing out of the ordinary in my application or environment configuration files, nor have I installed any unusual gems that would interfere with the test environment.</p>
  
  <p><strong>Edit March 9th</strong></p>
  
  <p><a href="https://stackoverflow.com/users/589985/xavier-holt">Xavier Holt</a>'s suggestion, explicitly specifying the path to the test_helper worked; however, this revealed an issue with ActiveSupport.</p>
  
  <p>Now when I attempt to run the test, I receive the following error message (as also listed above):</p>
  
  <pre><code>user_test.rb:3:in `&lt;main&gt;': uninitialized constant Object::ActiveSupport (NameError)
  </code></pre>
  
  <p>But as you can see above, Action Pack is all installed and update to date.</p>
  
  <p><strong>Edit March 13th</strong></p>
  
  <p>When attempting to run tests using <code>rake test:units</code> the following stack trace is dumped to the console:</p>
  
  <pre><code>test/unit/bookmark_test.rb:3:in `&lt;top (required)&gt;': uninitialized constant Objec
  t::ActiveSupport (NameError)
          from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `load'
          from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `block in &lt;main&gt;'
          from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `each'
          from C:/Ruby192/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `&lt;main&gt;'
  rake aborted!
  </code></pre>
  
  <p>So looking into the file listed above, I see the following:</p>
  
  <pre><code>#!/usr/bin/env ruby
  
  # Load the test files from the command line.
  
  ARGV.each { |f| load f unless f =~ /^-/  }
  </code></pre>
  
  <p>To my knowledge, everything looks as expected.</p>