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

  • SEARCH
  • Home
  • 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 6597315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:11:37+00:00 2026-05-25T18:11:37+00:00

Newly installed will_paginate 3.0.0 gem ‘will_paginate’, ‘~> 3.0.0′, :require=>’will_paginate/data_mapper’ Running a controller query: @tickets

  • 0

Newly installed will_paginate 3.0.0

gem 'will_paginate', '~> 3.0.0', :require=>'will_paginate/data_mapper'

Running a controller query:

@tickets = Ticket.paginate(:page => params[:page], :per_page => 5,:username => @ticket.username)

Which works, pulls up all the tickets for a user and paginates in 5’s if I put ?page=X where x is a page number in the url.

=will_paginate(@tickets) 

in the view does not work, this results in

undefined method `will_paginate' for #<#<Class:0x000000053674c8>:0x0000000535cd48>

So will_paginate works, but not the view helper. Am I missing something? I’m using slim templating if that makes any difference. Is there some syntax change I’m missing? The documentation is simple but unhelpful beyond this point. I looked into the source, and there does not seem to be any changes, but I cannot figure why it is inaccessible

And then on tangent, this messes with an association.

=> @instance.model_belonging_to_instance.create(:text=>’test’)

TypeError: can't convert nil into Integer
    from /home/qx/.rvm/gems/ruby-1.9.2-p180/gems/will_paginate-3.0.0/lib/will_paginate/page_number.rb:16:in `Integer'
    etc etc et al

SOLUTION:

gemfile:

gem 'will_paginate', '~> 3.0.0'       # removed this, :require=>'will_paginate/data_mapper'

intializer:

require 'will_paginate'
require 'will_paginate/data_mapper'

It shows up, but if not at the top of the template, I get a

stack level too deep

error I am unable to interpret

  • 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-25T18:11:38+00:00Added an answer on May 25, 2026 at 6:11 pm

    Don’t use the :require option in the Gemfile, as you already figured out; instead require “will_paginate/data_mapper” somewhere in config/application.rb, for instance after the Bundler setup.

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

Sidebar

Related Questions

I newly installed xcode 4.0.2 from the application cd running on snow leopard 10.6.8
When I try to deploy reports to a newly installed SSRS 2005 server (remote
I've checked out a module from CVS onto a newly installed Windows 7 machine.
I've got this weird problem - I'm calling ChangeServiceConfig on a newly installed service
I recently deployed my ASP.NET 3.5 application to my test server, a newly installed
So, I've got task from my boss to install opendocman on our newly installed
I have installed Eclipse & CDT plugin on newly installed Ubuntu. The indexing is
i am trying to do a deployment with capistrano to newly installed Ubuntu server
How can I properly switch the newly installed Symfony 1.4 framework from Doctrine (that
I have a problem with my newly installed VisualStudio 2008 SP1 on a Windows

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.