# Pagination

**URL:** <https://www.ruby-forum.com/t/pagination/192445>\
**Category:** Rails\
**Created:** [July 30, 2010, 12:24pm UTC](https://www.ruby-forum.com/t/pagination/192445 "2010-07-30T12:24:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![disruptivetechnolog](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ce7236/32.png) [@disruptivetechnolog](https://www.ruby-forum.com/u/disruptivetechnolog)\
**Post date:** [July 30, 2010, 12:24pm UTC](https://www.ruby-forum.com/t/pagination/192445/1 "2010-07-30T12:24:07Z")

</div>

Pagination

I am using an old tutorial which is tripping me right up as I have the  
latest version of rails installed. I’m persisting as I think I’m  
learning a little bit more about how RoR works. However after installing  
the scaffolding plug-in to fix an earlier problem I now have a problem  
with the pagination. I have followed this workaround:

> **[Gotchas When Upgrading to Rails 2.1](https://thoughtbot.com/blog/gotchas-when-upgrading-to-rails-2-1)**
>
> We’ve upgraded several Rails 2.0 application to Rails 2.1 now, and we’ve...

and attempted to place require will\_paginate in the environment.rb  
location, but I find that I cannot then rub the Webrick server. I get  
the following error.

home/brett/RoR/Apps/OpenBenefit/depot/config/environment.rb:42:  
undefined local variable or method `will\_paginate’ for main:Object  
(NameError)

How can I fix this, Am I doing something stupid?

B

---

<div class="post-metadata">

**Author:** ![disruptivetechnolog](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ce7236/32.png) [@disruptivetechnolog](https://www.ruby-forum.com/u/disruptivetechnolog)\
**Post date:** [July 30, 2010, 1:10pm UTC](https://www.ruby-forum.com/t/pagination/192445/2 "2010-07-30T13:10:05Z")

</div>

On Jul 30, 11:24 am, Dis T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> and attempted to place require will\_paginate in the environment.rb  
> location, but I find that I cannot then rub the Webrick server. I get  
> the following error.
> 
> home/brett/RoR/Apps/OpenBenefit/depot/config/environment.rb:42:  
> undefined local variable or method `will\_paginate’ for main:Object  
> (NameError)
> 
> How can I fix this, Am I doing something stupid?

you’re missing some quote marks around will\_paginate. More up to date  
advice would be to use the config.gem stuff to load will\_paginate

Fred
