# Pagination problem

**URL:** <https://www.ruby-forum.com/t/pagination-problem/140239>\
**Category:** Rails\
**Created:** [June 12, 2008, 5:58am UTC](https://www.ruby-forum.com/t/pagination-problem/140239 "2008-06-12T05:58:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nanetsu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/eada6e/32.png) [@nanetsu](https://www.ruby-forum.com/u/nanetsu)\
**Post date:** [June 12, 2008, 5:58am UTC](https://www.ruby-forum.com/t/pagination-problem/140239/1 "2008-06-12T05:58:39Z")

</div>

Hello everybody!!

I have a problem cannot resolve in hold 2 days.  
This is step by step I made my Rail Application

1. Create rail Aplication

> rails store

1. Create database named store\_development by mySQL

2. Fix store\config\database.yml

3. Generate controller

> ruby script/generate controller Manage

1. Generate model

> ruby script/generate scaffold Item

1. Repair manage\_controller.rb like:  
[b]

* * *

class ManageController \< ApplicationController  
verify :method =\> :post, :only =\> [ :destroy, :create, :update  
],:redirect\_to =\> { :action =\> :list }  
def list  
@item\_pages, @items = paginate :items, :per\_page =\> 10  
end  
end

* * *

[/b]

1. Running the application and an error appear in the browser like:  
undefined method `paginate’ for #ManageController:0x2f2ce50

I also install classic\_pagination but still the same error appeared in  
the browser.

[:(!][V][V]

Someone give me idea or solution please!!

Best regards,

---

<div class="post-metadata">

**Author:** ![nanetsu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/eada6e/32.png) [@nanetsu](https://www.ruby-forum.com/u/nanetsu)\
**Post date:** [June 12, 2008, 8:37am UTC](https://www.ruby-forum.com/t/pagination-problem/140239/2 "2008-06-12T08:37:37Z")

</div>

My Quang wrote:

> 1. Running the application and an error appear in the browser like:  
> undefined method `paginate’ for #ManageController:0x2f2ce50
> 
> I also install classic\_pagination but still the same error appeared in  
> the browser.

> Someone give me idea or solution please!!
> 
> Best regards,

restart the server

---

<div class="post-metadata">

**Author:** ![nanetsu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/eada6e/32.png) [@nanetsu](https://www.ruby-forum.com/u/nanetsu)\
**Post date:** [June 12, 2008, 8:50am UTC](https://www.ruby-forum.com/t/pagination-problem/140239/3 "2008-06-12T08:50:33Z")

</div>

Pokkai D. wrote:

> My Quang wrote:
> 
> > 1. Running the application and an error appear in the browser like:  
> > undefined method `paginate’ for #ManageController:0x2f2ce50
> > 
> > I also install classic\_pagination but still the same error appeared in  
> > the browser.
> 
> > Someone give me idea or solution please!!
> > 
> > Best regards,
> 
> restart the server

Hello Pokkai

I have restarted the server, but it cannot

I installed classic\_pagination by this command

> ruby script/plugin install svn://errtheblog.com/svn/plugins/classic\_pagination  
> (not display any thing)

I think the problem is that command have not any effect in my PC.  
Because event thought it didn’t throw any mistake but i could not see  
anything after running that command. And I did not see pagination.rb in  
Ruby folder.

---

<div class="post-metadata">

**Author:** ![nanetsu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/eada6e/32.png) [@nanetsu](https://www.ruby-forum.com/u/nanetsu)\
**Post date:** [June 12, 2008, 10:12am UTC](https://www.ruby-forum.com/t/pagination-problem/140239/4 "2008-06-12T10:12:41Z")

</div>

I have just download “classic\_pagination” to “c:\Classic\_pagination”  
folder.  
But I don’t know how to add that plugin to rail from  
“c:\Classic\_pagination”?

Someone help me install it.

Thanks!!

---

<div class="post-metadata">

**Author:** ![nanetsu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/eada6e/32.png) [@nanetsu](https://www.ruby-forum.com/u/nanetsu)\
**Post date:** [June 12, 2008, 9:18am UTC](https://www.ruby-forum.com/t/pagination-problem/140239/5 "2008-06-12T09:18:58Z")

</div>

My Quang wrote:

> Hello Pokkai
> 
> I have restarted the server, but it cannot
> 
> I installed classic\_pagination by this command
> 
> > ruby script/plugin install svn://errtheblog.com/svn/plugins/classic\_pagination  
> > (not display any thing)
> 
> I think the problem is that command have not any effect in my PC.  
> Because event thought it didn’t throw any mistake but i could not see  
> anything after running that command. And I did not see pagination.rb in  
> Ruby folder.

I have just use snv to download  
“svn://errtheblog.com/svn/plugins/classic\_pagination”

But it timeout!!

---

<div class="post-metadata">

**Author:** ![nanetsu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/eada6e/32.png) [@nanetsu](https://www.ruby-forum.com/u/nanetsu)\
**Post date:** [June 12, 2008, 11:25am UTC](https://www.ruby-forum.com/t/pagination-problem/140239/6 "2008-06-12T11:25:38Z")

</div>

On 12 Jun 2008, at 09:12, My Quang wrote:

> I have just download “classic\_pagination” to “c:\Classic\_pagination”  
> folder.  
> But I don’t know how to add that plugin to rail from  
> “c:\Classic\_pagination”?

move the folder to your\_app/vendor/plugins

Fred

---

<div class="post-metadata">

**Author:** ![nanetsu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/eada6e/32.png) [@nanetsu](https://www.ruby-forum.com/u/nanetsu)\
**Post date:** [June 12, 2008, 11:55am UTC](https://www.ruby-forum.com/t/pagination-problem/140239/7 "2008-06-12T11:55:38Z")

</div>

My Quang wrote:

> I have just download “classic\_pagination” to “c:\Classic\_pagination”  
> folder.  
> But I don’t know how to add that plugin to rail from  
> “c:\Classic\_pagination”?
> 
> Someone help me install it.
> 
> Thanks!!

I resolved it

Don’t install classic\_pagination by

> script/plugin install svn://errtheblog.com/svn/plugins/classic\_pagination

Because it’s easy to be timeout

I use below command

> script/plugin install [http://redmine.rubyforge.org/svn/trunk/vendor/plugins/classic\_pagination/](http://redmine.rubyforge.org/svn/trunk/vendor/plugins/classic_pagination/)

That’s OK
