16 Apr 2008, 15:55
Generic-user-small

n (1 post)

Hi,

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
Generic-user-small

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 : http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/39739e012b09f97a/7364aa0c8bf5050f

23 Apr 2008, 19:50
Samr_small_pragsmall

Sam Ruby (584 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”:http://pragprog.com/titles/rails3/agile-web-development-with-rails-third-edition under development, and the depot application had to be reworked significantly for Rails 2.0.2.

09 May 2008, 16:07
Jaime_pragsmall

Jaime Bellmyer (4 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
Samr_small_pragsmall

Sam Ruby (584 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_pragsmall

Jaime Bellmyer (4 posts)

Another note: on page 87 of the PDF, footnote #14 is a link to http://media.pragprog.com/titles/rails3/code/depot_c/public/images, which fails with a 403 error.

09 May 2008, 16:29
Jaime_pragsmall

Jaime Bellmyer (4 posts)

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

  You must be logged in to comment