small medium large xlarge

16 Apr 2008, 15:55
n (1 post)


Newb in need of help:

I am using Rails 2.0.2 and the 2nd edition of the book, and am totally stuck (print) page 67 where the sample says to edit admin_controller.rb to be: ` class AdminController < ApplicationController scaffold :product end ` When I try to run http://localhost:3000/admin, the server returns: ` NoMethodError in AdminController#index

undefined method `scaffold’ for AdminController:Class

RAILS_ROOT: /railsProjects/depot Application Trace | Framework Trace | Full Trace

app/controllers/admin_controller.rb:2 `

Actually, I have seen a few people complain about this in the errata, which says it’s fixed in B1.02, but I have no idea what this means.

21 Apr 2008, 22:39
Abdullah AlDwayish (3 posts)

i’ve ran into the same problem , the whole version thing with RoR are annoying .. , i’ve the paper book but i bought the pdf hoping it will be updated to Rails 2.0+

follow this link i track it from google it has different solutions :

23 Apr 2008, 19:50
Sam Ruby (633 posts)

Unfortunately, scaffolding was dramatically changed in Rails 2.0. Dynamic scaffolding is gone, and static scaffolding is even more static than it was in previous versions of Rails. There is a “third edition”: under development, and the depot application had to be reworked significantly for Rails 2.0.2.

09 May 2008, 16:07
Jaime Bellmyer (3 posts)

To editing staff:

This has probably already been reported, but I couldn’t find it. There are a couple typos. On page 76 of the PDF (v3, B1.0) it tells the reader to enter the controller, all lowercase, into the browser address bar. But it lists “product” as the controller, when it’s actually “products”, plural.

Second, all the example images show admin as the controller in the address bar, which is leftover from the previous version of the book.

Thanks for a great book!

09 May 2008, 16:27
Sam Ruby (633 posts)

I mention in the preface to the third edition that the images have not yet been updated, but the name of the controller clearly is an error. I’ll make sure that that error is corrected in the next beta. Thanks!

09 May 2008, 16:28
Jaime Bellmyer (3 posts)

Another note: on page 87 of the PDF, footnote #14 is a link to, which fails with a 403 error.

09 May 2008, 16:29
Jaime Bellmyer (3 posts)

Thanks, Sam - now that you mention it, I do remember the note about images. thanks!

You must be logged in to comment