title: What is this uninitialized constant error?
body: <p>I created ruby class and put it in app_dir/lib/appointment_messaging_job.rb</p>
  
  <pre><code>class AppointmentMessagingJob
    def perform
    end
  end
  </code></pre>
  
  <p>In one of my controllers I do this:</p>
  
  <pre><code>test = AppointmentMessagingJob.new
  </code></pre>
  
  <p>I get a very annoying very incomprehensible error:</p>
  
  <pre><code>Started GET "/en/appointments/1/approve" for 127.0.0.1 at 2012-09-04 13:02:43 -0400
  Processing by AppointmentsController#approve as HTML
    Parameters: {"locale"=&gt;"en", "id"=&gt;"1"}
  Completed 500 Internal Server Error in 2ms
  
  NameError (uninitialized constant AppointmentsController::AppointmentMessagingJob):
    app/controllers/appointments_controller.rb:89:in 'approve'
  </code></pre>
  
  <p>What is this uninitialized constant? I really don't get it.</p>