RichardOnRails
2008-Jun-16 01:16 UTC
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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
RichardOnRails
2008-Jun-16 01:21 UTC
Re: Rails Cookbook recommends adding "scaffold :language" -- fails
I apologize for the duplicate post. I only pressed Send once, but somehow two copies were posted. Again, my apologies, Richard --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Frederick Cheung
2008-Jun-16 09:17 UTC
Re: Rails Cookbook recommends adding "scaffold :language" -- fails
On 16 Jun 2008, at 02:16, RichardOnRails wrote:> > 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> 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 > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
RichardOnRails
2008-Jun-18 13:30 UTC
Re: Rails Cookbook recommends adding "scaffold :language" -- fails
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 On Jun 16, 5:17 am, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 16 Jun 2008, at 02:16, RichardOnRails wrote: > > > > > > > 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 > > > 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--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
RichardOnRails
2008-Jun-20 18:39 UTC
Re: Rails Cookbook recommends adding "scaffold :language" -- fails
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 On Jun 16, 5:17 am, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 16 Jun 2008, at 02:16, RichardOnRails wrote: > > > > > > > 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 > > > 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--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---