The Depot application error

Hello,
I am new to RoR; I am trying to follow the Pragmatic programmer’s Depot
application.
In the Iteration A1: Get something running - I am following all the
steps as listed -

  1. Create a Rails application using ‘Rails Depot’ on the command prompt
  2. Creating the databases in MySQL
  3. I check the configuration using ‘rake db:migrate’ and it seems to
    give the right output
  4. I create the model using ‘ruby script/generate model Product’ and
    then edit the Products table using the guidance in the book and the
    rails gives the output that seems to confirm that the table is generated
    successfully.
  5. I then perform ‘rake db:migrate’ again to ensure the updates to the
    table are performed.
  6. I then create the controller using ‘ruby script/generate controller
    Admin’ and the script works just fine; I then edit the file
    ‘admin_controller.rb’ file to add scaffold using the command ‘scaffold
    :product’

When i try to run using the URL localhost:3000/admin - I am getting the
following error: undefined method `scaffold’ for AdminController:Class.

Please help. I appreciate any tips and guidance in advance.

Thanks!

Scaffolding is deprecated in Rails 2.0

To re-install it type script/plugin install scaffolding

I used the wrong wording.

On Jan 3, 2008 7:19 AM, Greg D. [email protected] wrote:

Greg D.
http://destiney.com/


Ryan B.

Feel free to add me to MSN and/or GTalk as this email.

On 1/2/08, Ryan B. [email protected] wrote:

Scaffolding is deprecated in Rails 2.0

To re-install it type script/plugin install scaffolding

How is being moved to a plugin considered deprecation?


Greg D.
http://destiney.com/

In installed the scaffolding
It has now started giving me the
undefined method `paginate’ for #AdminController:0x31971b8

error.
I have since installed the Pagianate plugin from
ruby script/plugin install
svn://errtheblog.com/svn/plugins/will_paginate
but still the above error is persisting.

Any clues?

Thanks!

Ryan B. wrote:

Scaffolding is deprecated in Rails 2.0

To re-install it type script/plugin install scaffolding

That’d be script/plugin install classic_pagination

Ravi,

You’re probably going to run into other stuff like this when using
documentation written for Rails < 2.0 on your shinny new 2.0.x
application. There are notable differences between 1.2.x and 2.0.x, so
if you can use some documentation written with 2.0.x in mind, you
might have a smoother experience.

Preston

On 3 Jan 2008, at 19:45, Ravi Kukreja wrote:

In installed the scaffolding
It has now started giving me the
undefined method `paginate’ for #AdminController:0x31971b8

error.
I have since installed the Pagianate plugin from
ruby script/plugin install
svn://errtheblog.com/svn/plugins/will_paginate

You need the classic pagination plugin from the same place.

Fred

Ravi Kukreja wrote:

I am new to RoR; I am trying to follow the Pragmatic programmer’s Depot
application.

When i try to run using the URL localhost:3000/admin - I am getting the
following error: undefined method `scaffold’ for AdminController:Class.

Please help. I appreciate any tips and guidance in advance.

The book documents use with Rails 1.2 and the latest rails gem version
is 2.0. For someone trying to learn by using the book this will
create a list of problems as you go along. A number of things have
changed.

Instead it might be better for you to remove all of your current gems
related to rails (e.g. rails, action*, etc. find with ‘gem list’) and
then reinstall rails 1.2.6.

gem install rails --version 1.2.6 --include-dependencies

That will cause your installed version of rails to be 1.2.6 and will
then match the book. You should be able to work through all of the
examples and I imagine that you will have a better learning experience
in general.

Work quickly through the book’s examples. Then after having learned
what you can using the rails 1.2.6 material you can upgrade to the
latest rails 2.x and have a much easier time.

Bob

Ryan B. wrote:

I used the wrong wording.

On Jan 3, 2008 7:19 AM, Greg D. [email protected] wrote:

Greg D.
http://destiney.com/


Ryan B.
http://www.frozenplague.net
Feel free to add me to MSN and/or GTalk as this email.

Hi
I use the Agile web development using Rails Manual. I too have the
problem with the plugins. I have an error ‘undefined method `paginate’
for #AdminController:0xb6726f58’, even after installing scaffolding
plugin and will_paginate plugin. Please help me