Installing pagination problem?

I am trying to work through agile web development on rails , I have
created a controller with just the following:

scaffold :product

I get

“undefined method scaffold” error from the browswer.

so i installed script/plugin install scaffolding

then get the following response from the browser

undefined method `paginate’

I have tried to install the following , the cursor just moves to the
next line to the prompt, but there is no download activity ,there is no
success or failure message or details of any kind,.

script/plugin install
svn://errtheblog.com/svn/plugins/classic_pagination

script/plugin install svn://errtheblog.com/svn/plugins/will_paginate

Can anyone give me any ideas on how i can proceed? I am on a windows xp
machine, i have tried all this with instantrails and a 1 click
installation of ruby and ‘gem install rails --include-dependencies’ of
rails.

Ruby version 1.8.6 (i386-mswin32)
RubyGems version 0.9.4
Rails version 2.0.2
Active Record version 2.0.2
Action Pack version 2.0.2
Active Resource version 2.0.2
Action Mailer version 2.0.2
Active Support version 2.0.2
Application root C:/rails1/depot
Environment development
Database adapter mysql
Database schema version 1

Thanks joe.

I tried installing subversion , didn’t have any luck with that.

I tried to follow your advice on using restful scaffolding but wasn’t
really sure what I was doing and was thinkings something else was bound
to crop up later on down the line with the book.

So I decided to take the cowards way out and uninstall and install rails
1.2.6. Making more progress now .

Do you have subversion installed? You might not be able to check out
the plugins without it. (http://subversion.tigris.org/servlets/
ProjectDocumentList?folderID=91&expandFolder=91&folderID=74)

I would avoid using the old scaffolding/pagination if I were you, you
only end up replacing them with real ones, so why not miss a step and
just do

script/generate scaffold Product field:type field:type field:type
(etc)

This will make you a RESTful scaffold by default in Rails 2.
Then change the “find” methods to “paginate” (add :page =>
params[:page] in there too) in the controller, and add <%=
will_paginate(@products) %> to the bottom of your table view

There’s a reason the Rails team remove legacy features, and the
automatic scaffold and pagination were both old ones that had to go. I
guess we need that AWD update for Rails 2 pretty soon!!

Let me know if there is anything more i can do to assist you.

Joe

On Jan 9, 12:16 am, Marc L. [email protected]

Hi Marc,

You’re probably best off sticking with Rails 1.2.6 because there are
loads of convention changes in Rails 2 which will just cause you
headaches if you’re following the old tutorials
However, i would recommend that you keep in the back of your mind that
several notable areas have moved on a lot since AWD was written. Check
out
http://ryandaigle.com/articles/2007/12/7/rails-2-0-final-released-summary-of-features
for a full list of changes.

Mainly these are around the routes and RESTful controllers. It
basically means you lose all your longwinded {:controller =>
‘posts’, :action => ‘show’, :id => @post} commands and get nice
flexible ones like post_path(@post)
Also when you get to the bit about AJAX, instead of using request.xhr?
to checl for an AJAX request we can use:
respond_to do |format|
format.js { # do something from an rjs template }
format.html { #do something from an html template }
format.xml { #return some xml }
end

etc to target the request at the right kind of document.

Read carefully the chapter on routing requests and espeically the bit
on REST, as this is the way Rails 2 is heading and it is very nice.
But for now, just enjoy the experience of using Rails for the first
time and finding all those WONDERFULLY quick and brilliant ways of
doing things!

Finally for a good API resource, check out
http://www.gotapi.com/rubyrails,
though it is now updated for Rails 2. I find it invaluable since it is
very quick to use as a reference.

On Jan 9, 8:06 am, Marc L. [email protected]