undefined method `paginate'

12 views
Skip to first unread message

huang zhimin

unread,
Dec 13, 2007, 3:33:58 AM12/13/07
to rubyonra...@googlegroups.com
I have updated rails to 2.0.1. When I wrote a blog demo, I got NoMethodError undefined method 'scaffold'
I searched with google and installed scaffolding plugin, now the undefined method 'scaffold' has gone, but there's still NoMethodError
undefined method `paginate' 
How can I fix this error?

--
http://sourceforge.net/projects/mycodeline/

Imobach González Sosa

unread,
Dec 13, 2007, 3:41:07 AM12/13/07
to Ruby on Rails: Talk
On 13 dic, 08:33, "huang zhimin" <flyer...@gmail.com> wrote:
> I have updated rails to 2.0.1. When I wrote a blog demo, I got NoMethodError
> *undefined method 'scaffold'*
> I searched with google and installed scaffolding plugin, now the undefined
> method 'scaffold' has gone, but there's still NoMethodError
>
> *undefined method `paginate' *
>
> How can I fix this error?

AFAIK, pagination is not included in the core Rails distribution. You
have to install a plugin like will_paginate[1].

Good luck!

[1] http://agilewebdevelopment.com/plugins/will_paginate

huang zhimin

unread,
Dec 13, 2007, 3:44:21 AM12/13/07
to rubyonra...@googlegroups.com
Can it work with scaffold plugin?

Peter Bengtson

unread,
Dec 13, 2007, 3:47:34 AM12/13/07
to rubyonra...@googlegroups.com
Just install the plugin "classic_pagination", if you need the pre-2.0
default Rails pagination.

/ Peter

huang zhimin

unread,
Dec 13, 2007, 3:59:35 AM12/13/07
to rubyonra...@googlegroups.com

Ratnavel Sundaramurthi

unread,
Dec 14, 2007, 4:54:49 AM12/14/07
to rubyonra...@googlegroups.com
For pagination use will_paginate plugin..

It sounds good..

U can install the plugin by..

1. Navigate to the project's root location in command prompt.
2. Type script/plugin install
svn://errtheblog.com/svn/plugins/will_paginate

(example:
E:\Tests\cookbook>ruby script/plugin install
svn://errtheblog.com/svn/plugins/will_paginate)
--
Posted via http://www.ruby-forum.com/.

Jim Tobin

unread,
Dec 15, 2007, 5:07:17 PM12/15/07
to rubyonra...@googlegroups.com
And then there's a Railscast episode on iTunes that shows how to set
it up. I followed those instructions and it was easy and fast.

Episode 51.

Cheers,

Jim

DavidA

unread,
Dec 22, 2007, 9:10:47 PM12/22/07
to Ruby on Rails: Talk
If you wan t to use scaffolding in Rails 2.0 this is the correct
answer. The Scaffolding method calls paginate, and will not work with
will_paginate

On Dec 13, 9:47 pm, Peter Bengtson <pe...@peterbengtson.com> wrote:
> Just install the plugin "classic_pagination", if you need the pre-2.0  
> default Rails pagination.
>
>         / Peter
>
> 13 dec 2007 kl. 09.44 skrev huang zhimin:
>
> > Can it work with scaffold plugin?
>
> > On Dec 13, 2007 4:41 PM, Imobach González Sosa <imobac...@gmail.com>  
Reply all
Reply to author
Forward
0 new messages