# Undefined method \`paginate'

**URL:** <https://www.ruby-forum.com/t/undefined-method-paginate/172107>\
**Category:** Rails\
**Created:** [July 14, 2009, 11:04pm UTC](https://www.ruby-forum.com/t/undefined-method-paginate/172107 "2009-07-14T23:04:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [July 14, 2009, 11:04pm UTC](https://www.ruby-forum.com/t/undefined-method-paginate/172107/1 "2009-07-14T23:04:08Z")

</div>

How come I get this error? I have the same setup on my local dev machine  
as the server where I get the error, using the will\_paginate gem and  
require in env.

The server uses the same version 2.2.2. And the same rails version and  
everything.

---

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [July 15, 2009, 2:15am UTC](https://www.ruby-forum.com/t/undefined-method-paginate/172107/2 "2009-07-15T02:15:24Z")

</div>

How is your server configured? Mongrel, passenger? Have you vendored  
your gems?

Cheers,  
Nicholas

On Jul 14, 5:04 pm, Pål Bergström [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [July 15, 2009, 2:38am UTC](https://www.ruby-forum.com/t/undefined-method-paginate/172107/3 "2009-07-15T02:38:41Z")

</div>

It’s a common issue depending on how your setup exists. If you are  
having a lot of difficulty with it, you can install the plugin instead  
which will fix the error you are having usually 95% of the time.

---

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [July 15, 2009, 8:47am UTC](https://www.ruby-forum.com/t/undefined-method-paginate/172107/4 "2009-07-15T08:47:58Z")

</div>

Ã„lphÃ¤ BlÃ¼Ã« wrote:

> It’s a common issue depending on how your setup exists. If you are  
> having a lot of difficulty with it, you can install the plugin instead  
> which will fix the error you are having usually 95% of the time.

I solved it. I just needed to create a local gem and then install  
will\_paginate. It was on the server, I think, but didn’t work. Or maybe  
it wasn’t. Anyway, when I do “gem list” I get a long, long list of gems,  
and one of them is “will\_paginate”.

---

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [July 15, 2009, 9:58am UTC](https://www.ruby-forum.com/t/undefined-method-paginate/172107/5 "2009-07-15T09:58:07Z")

</div>

BTW, if your gem is just plain will\_paginate, it is VERY old. Unless  
I’m mistaken, development has moved to GitHub, and the preferred gem  
is now mislav-will\_paginate.

–Matt J.

On Jul 15, 2:47 am, Pål Bergström [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [July 15, 2009, 10:01am UTC](https://www.ruby-forum.com/t/undefined-method-paginate/172107/6 "2009-07-15T10:01:27Z")

</div>

Matt J. wrote:

> BTW, if your gem is just plain will\_paginate, it is VERY old. Unless  
> I’m mistaken, development has moved to GitHub, and the preferred gem  
> is now mislav-will\_paginate.
> 
> –Matt J.
> 
> On Jul 15, 2:47ï¿½am, Pï¿½l Bergstrï¿½m [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

I tried that and it didn’t work. “could not find gem  
mislav-will\_paginate locally or in a repository”

---

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [July 15, 2009, 5:59pm UTC](https://www.ruby-forum.com/t/undefined-method-paginate/172107/7 "2009-07-15T17:59:06Z")

</div>

post the message error please, for analyse.

case the problem is to require your gem will\_paginate, do you need  
require  
this will\_paginate in the archive enviroment.rb,  
ex: require ‘will\_paginate’

Att.

Paulo S.

2009/7/14 PÃ¥l BergstrÃ¶m [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> >

–  
Paulo Roberto  
Webdesigner  
Fortaleza - CE

---

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [July 15, 2009, 6:03pm UTC](https://www.ruby-forum.com/t/undefined-method-paginate/172107/8 "2009-07-15T18:03:32Z")

</div>

Paulo S. wrote:

> post the message error please, for analyse.
> 
> case the problem is to require your gem will\_paginate, do you need  
> require  
> this will\_paginate in the archive enviroment.rb,  
> ex: require ‘will\_paginate’

I have require ‘will\_paginate’

I also had to uninstall the previous ‘will\_paginate’ gem. Now it works.

---

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [July 15, 2009, 10:23am UTC](https://www.ruby-forum.com/t/undefined-method-paginate/172107/9 "2009-07-15T10:23:10Z")

</div>

Matt J. wrote:

> BTW, if your gem is just plain will\_paginate, it is VERY old. Unless  
> I’m mistaken, development has moved to GitHub, and the preferred gem  
> is now mislav-will\_paginate.
> 
> –Matt J.
> 
> On Jul 15, 2:47ï¿½am, Pï¿½l Bergstrï¿½m [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

It worked with “sudo gem install mislav-will\_paginate -s  
[http://gems.github.com](http://gems.github.com)”

Now I got mislav-will\_paginate in my gem list. Do I need to make any  
changes in my code?
