title: Using factory_girl within a rake task - getting uninitialized constant
body: <p>I'm trying to use Factory Girl in a rake task like this:</p>
  
  <pre><code>require 'factory_girl'
  require File.expand_path("spec/factories.rb")
  
  namespace :users do
  
    desc "Create sample users for use in development" 
    task :create_sample_users =&gt; :environment do
      Factory(:user, :email =&gt; "pending@acme.com")
      Factory(:approved_user, :email =&gt; "user@acme.com") 
    end
  
  end
  </code></pre>
  
  <p>However when I run <code>rake users:create_sample_users</code> I get the error <code>uninitialized constant Entry</code> (Entry is the name of one of my app's classes).</p>
  
  <p>Can anyone tell me how to get Factory girl to see my classes?  It's working fine in my tests, just failing in my rake tasks.</p>