Rails Cookbook recommends adding "scaffold :language" -- fails

Hi,

I following the guidance of Rails Cookbook (First Ed, Jan 2007). I
followed the first recommendation on page 27 to:

1. ruby script/generate model language
2. script/generate controller language
3. modify class LanguageController to read
    class LanguageController < ApplicationController
        scaffold :language
    end
4. ruby script/server (to start Mongrel, in my case)
5. http://localhost:3000/language/new

FireFox 2.0.0.1 responded with

NoMethodError in LanguageController#new
undefined method `scaffold' for LanguageController:Class
RAILS_ROOT: C:/var/www/cookbook
Application Trace | Framework Trace | Full Trace
app/controllers/language_controller.rb:2

Could the difference be that I'm running a later version of Ruby &
Rails than the author was when he wrote this book. Is there a
workaround?

I'm going to backtrack and try the author's one-step command:
ruby script/generate scaffold, language

My other (relevant) software is WinXP-Pro/SP2, Ruby186-26_rc2, Rails
2.0.2, Gem 1.0.1, MySQL 5.0.27-nt.

Thanks in advance,
Richard

I apologize for the duplicate post. I only pressed Send once, but
somehow two copies were posted.

Again, my apologies,
Richard

Hi,

I following the guidance of Rails Cookbook (First Ed, Jan 2007). I
followed the first recommendation on page 27 to:

1. ruby script/generate model language
2. script/generate controller language
3. modify class LanguageController to read
   class LanguageController < ApplicationController
       scaffold :language
   end
4. ruby script/server (to start Mongrel, in my case)
5. http://localhost:3000/language/new

FireFox 2.0.0.1 responded with

NoMethodError in LanguageController#new
undefined method `scaffold' for LanguageController:Class
RAILS_ROOT: C:/var/www/cookbook
Application Trace | Framework Trace | Full Trace
app/controllers/language_controller.rb:2

Could the difference be that I'm running a later version of Ruby &
Rails than the author was when he wrote this book. Is there a
workaround?

I'm going to backtrack and try the author's one-step command:
ruby script/generate scaffold, language

Scaffolding in that sense was killed with rails 2 (it may still exist
as a plugin somewhere). An 18 month old book is very old in an area
moving as fast as rails (seems like it was written for rails 1.2,
released in jan 2007, we're now on 2.1)

Fred

Hi Frederick,

Thanks for the heads-up.

I've got about four books that apparently should be used for firewood
this winter. Can you recommend any websites that provide up-to-date
guidance for Rail newbies?

Best wishes,
Richard

Hi Frederick,

I found what looks like a perfect answer to my question:
http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html

You might want to recommend it to other Ruby 2.0 nubies that you help.

Regards,
Richard