Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 727473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:34:18+00:00 2026-05-14T06:34:18+00:00

I just installed the gem for will_paginate and it says that it was installed

  • 0

I just installed the gem for will_paginate and it says that it was installed successfully. I followed all the instructions listed with the plugin and I am getting an ‘undefined method `paginate’ for’ error. Can’t find much in the way of Google search and haven’t been able to fix it myself (obviously). Here is the code:

PostsController

def index
    @tag_counts = Tag.count(:group => :tag_name, :order => 'updated_at DESC', :limit => 10)
    @posts = Post.paginate :page => params[:page], :per_page => 50

    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @posts }
      format.json { render :json => @posts }
      format.atom
    end
  end

/model/post.rb

class Post < ActiveRecord::Base
  validates_presence_of :body, :title
  has_many :comments, :dependent => :destroy
  has_many :tags, :dependent => :destroy

  cattr_reader :per_page
    @@per_page = 10

end

/posts/views/index.html.erb

  <%= will_paginate @posts %>

UPDATE
I used the script/console to determine if will_paginate was correctly installed properly and it wasn’t. I had to add:

config.gem 'will_paginate', :version => '~> 2.3.11', :source => 'http://gemcutter.org'

to the /config/environments.rb file and restart the server. Works great.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T06:34:18+00:00Added an answer on May 14, 2026 at 6:34 am

    I used the script/console to determine if will_paginate was correctly installed properly and it wasn’t. I had to add:

    config.gem 'will_paginate', :version => '~> 2.3.11', :source => 'http://gemcutter.
    

    works great. Simple fix.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just installed the plugin for Paperclip and I am getting the following error
I just installed a gem but when I type gem_name --help It says: 'gem_name'
I just installed the PyDev plugin for Eclipse. Everything seems to be configured properly
I just installed jruby-1.4.0 to play around with it. I'm noticing however that warbler
I just installed Ruby EE 11.01. I had a Rails 2.3.8 application that was
I installed the gem according to the instructions at showoff.io , but when I
Using VirtualBox inside of Windows7, it has Ubuntu. Just installed rails 3.1 and getting
I'm using auto_complete plugin: https://github.com/crowdint/rails3-jquery-autocomplete I have installed the gem and added require line
Just installed the latest SDK for iPhone 2.1. When I go to File ->
Just installed AnkhSVN and I see the equivalent of svn up but I'd prefer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.