title: Rails sitemap_generator Uninitialized Constant?
body: <p>I'm trying to use the Rails site map_generator gem to generate site maps for a 8,000,00 page site. The gem can be found here: <a href="https://github.com/kjvarga/sitemap_generator" rel="nofollow">https://github.com/kjvarga/sitemap_generator</a></p>
  
  <p>Here is my code in sitemap.rb:</p>
  
  <pre><code>require 'rubygems'
  require 'sitemap_generator'
  
  # Set the host name for URL creation
  SitemapGenerator::Sitemap.default_host = "http://www.mysite.com"
  
  SitemapGenerator::Sitemap.create do
    add '/content.aspx?page=privacypolicy'
    Product.find_each do |product|
      add product_path(ppid), :lastmod =&gt; content.updated_at
    end
  end
  </code></pre>
  
  <p>However, when I run </p>
  
  <pre><code>&gt;&gt; ruby sitemap.rb  
  </code></pre>
  
  <p>I get an error that says:</p>
  
  <blockquote>
    <p>sitemap.rb:9:in `block in ': uninitialized constant
    SitemapGenerator::Interpreter::Product (NameError)</p>
  </blockquote>
  
  <p>However "Product" is the correct name of my model. Why is this happening?</p>
  
  <p>I'm running Rails 3.1.2 and Ruby 1.9.</p>