title: Where do I enqueue jobs into ActiveJob in Rails 4.2?
body: <p>I am a beginner when it comes to Rails. I am trying to follow this example:</p>
  
  <pre><code>http://ryanselk.com/2014/09/25/using-background-jobs-in-rails-42-with-active-job/
  </code></pre>
  
  <p>It says:</p>
  
  <p>"Jobs can be added to the job queue from anywhere. We can add a job to the queue by: ResizeImage.perform_later '<a href="http://example.com/ex.png" rel="nofollow">http://example.com/ex.png</a>' "</p>
  
  <p>[UPDATE] Sorry, I am stupid. I came up with this task:</p>
  
  <pre><code>namespace :simple do
  
    # call from command line:
    # rake simple:resize_images 
  
    desc "Resize images"
    task resize_images: :environment do
  
      Dir.foreach('storage') do |next_image|
        puts next_image
        next if next_image == '.' or next_image == '..'
        ResizeImage.perform_later next_image
      end
  
    end
  
  end
  </code></pre>
  
  <p>but now I do:</p>
  
  <pre><code>rake simple:resize_images 
  </code></pre>
  
  <p>and I get:</p>
  
  <pre><code>zacek2_phpP9JGif.jpg
  rake aborted!
  NameError: uninitialized constant ResizeImage
  </code></pre>
  
  <p>I've tried: </p>
  
  <pre><code>require ResizeImage
  </code></pre>
  
  <p>but that did not fix the problem. </p>
  
  <p>I am afraid I don't understand how loading works in Rails. How do I load ResizeImage?</p>