title: rails 2, Will_paginate, undefined method `paginate' for #<Class:
body: <p>So I am running a rails 2.3.11 app, with bundler and I am having the darndest time getting will_paginate to work.  Its returning the following error:</p>
  
  <p>undefined method `paginate' for #&lt;Class:...</p>
  
  <pre><code>def show
       @category = Category.find_by_url_name(params[:id])
       @brands = @category.brands.find(:all, :order =&gt; "name")  
       @categories = Category.find(:all)
       @meta_title = "#{@category.name}"
  
      respond_to do |format|
        format.html do |wants|
                @brand = @brands.first   
                @products = Product.paginate(:page =&gt; params[:page], :per_page =&gt; 6,  :conditions =&gt; ['brand_id = ? AND category_id = ?', @brand.id, @category.id])
        render :template =&gt; 'brands/show'
        end
        format.xml  { render :xml =&gt; @category }
      end
    end
  </code></pre>
  
  <p>this is my controller action.  the full error:</p>
  
  <pre><code>NoMethodError in CategoriesController#show
  
  undefined method `paginate' for #&lt;Class:0x1034703e8&gt;
  RAILS_ROOT: /Users/tjs/Sites/emeraldcg
  
  Application Trace | Framework Trace | Full Trace
  /Users/tjs/.rvm/gems/ruby-1.8.7-p352/gems/activerecord-2.3.11/lib/active_record/base.rb:1998:in `method_missing'
  /Users/tjs/Sites/emeraldcg/app/controllers/categories_controller.rb:28:in `show'
  /Users/tjs/Sites/emeraldcg/app/controllers/categories_controller.rb:25:in `show'
  Request
  
  Parameters:
  
  {"id"=&gt;"acoustic-guitars"}
  Show session dump
  
  Response
  
  Headers:
  
  {"Content-Type"=&gt;"text/html",
   "Cache-Control"=&gt;"no-cache"}
  </code></pre>
  
  <p>my gemfile is pretty straight forward:</p>
  
  <pre><code># A sample Gemfile
  source "http://rubygems.org"
  
  # gem "rails"
  gem "rails", '2.3.11'
  gem "rake"
  gem "RedCloth", "&gt;=4.2.2"
  gem "will_paginate", "~&gt; 2.3.16"
  
  group :development do
    gem "mysql"
    gem "capistrano"
    gem "capistrano-ext"
  
  end
  
  group :test do
    gem "sqlite3"
  end
  </code></pre>
  
  <p>I would understand if this failed due to it being an array but why is it failing as a class method?</p>
  
  <p>thanks for the help.</p>