Hi, I keep getting undefined method `scaffold'' for EventsController:Class error method even though everything seems to be defined in my project. I was wondering if someone can explain to me what the problem is? I''m using ubuntu 8.10 with ruby 1.8.7 and rails 2.2.2. My Steps: 1) rails events 2) Created DB projects 3) ./script/generate model Event 4) configured db/migrate/####_create_events.rb file by adding columns 5) rake db:migrate 6) ./script/generate controller events 7) configured: app/controllers/events_controller.rb file class EventsController < ApplicationController scaffold :event end 8) ran webrick with url: http://localhost:3000/events and got the message below NoMethodError in EventsController#index undefined method `scaffold'' for EventsController:Class RAILS_ROOT: /home/mrmaster/Desktop/events Application Trace | Framework Trace | Full Trace app/controllers/events_controller.rb:2 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
This is not how scaffold works anymore ! ( and not for a few releases now! Suggest you take a look at some of the more recent tutorials and/or check out the more recent release notes for this and the past few releases... Check this one for a starter - http://www.tutorialspoint.com/ruby-on-rails-2.1/rails-scaffolding.htm HTH Dave On Nov 30, 9:57 am, Mrmaster Mrmaster <rails-mailing-l...@andreas- s.net> wrote:> Hi, > > I keep getting undefined method `scaffold'' for EventsController:Class > error method even though everything seems to be defined in my project. I > was wondering if someone can explain to me what the problem is? I''m > using ubuntu 8.10 with ruby 1.8.7 and rails 2.2.2. > > My Steps: > 1) rails events > 2) Created DB projects > 3) ./script/generate model Event > 4) configured db/migrate/####_create_events.rb file by adding columns > 5) rake db:migrate > 6) ./script/generate controller events > 7) configured: app/controllers/events_controller.rb file > > class EventsController < ApplicationController > scaffold :event > end > 8) ran webrick with url:http://localhost:3000/eventsand got the > message below > > NoMethodError in EventsController#index > > undefined method `scaffold'' for EventsController:Class > > RAILS_ROOT: /home/mrmaster/Desktop/events > Application Trace | Framework Trace | Full Trace > > app/controllers/events_controller.rb:2 > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Davo wrote:> This is not how scaffold works anymore ! ( and not for a few releases > now! > Suggest you take a look at some of the more recent tutorials and/or > check out the more recent release notes for this and the past few > releases... > Check this one for a starter - > http://www.tutorialspoint.com/ruby-on-rails-2.1/rails-scaffolding.htm > HTH Dave > > > On Nov 30, 9:57�am, Mrmaster Mrmaster <rails-mailing-l...@andreas-Thanks for the help and the new tutorial. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---