# Problem with scaffold

**URL:** <https://www.ruby-forum.com/t/problem-with-scaffold/154465>\
**Category:** Rails\
**Created:** [November 30, 2008, 1:57am UTC](https://www.ruby-forum.com/t/problem-with-scaffold/154465 "2008-11-30T01:57:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrmaster](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/7ea924/32.png) [@mrmaster](https://www.ruby-forum.com/u/mrmaster)\
**Post date:** [November 30, 2008, 1:57am UTC](https://www.ruby-forum.com/t/problem-with-scaffold/154465/1 "2008-11-30T01:57:20Z")

</div>

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](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

---

<div class="post-metadata">

**Author:** ![mrmaster](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/7ea924/32.png) [@mrmaster](https://www.ruby-forum.com/u/mrmaster)\
**Post date:** [November 30, 2008, 2:51am UTC](https://www.ruby-forum.com/t/problem-with-scaffold/154465/2 "2008-11-30T02:51:43Z")

</div>

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 -

> **[Ruby on Rails 2.1 - Scaffolding](http://www.tutorialspoint.com/ruby-on-rails-2.1/rails-scaffolding.htm)**
>
> Ruby on Rails 2 1 Scaffolding - While you're developing Rails applications, especially those which are mainly providing you with a simple interface to data in a database, it can often be useful to use the scaffold method.

HTH Dave

On Nov 30, 9:57 am, Mrmaster M. \<rails-mailing-l…@andreas-

---

<div class="post-metadata">

**Author:** ![mrmaster](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/7ea924/32.png) [@mrmaster](https://www.ruby-forum.com/u/mrmaster)\
**Post date:** [November 30, 2008, 3:03am UTC](https://www.ruby-forum.com/t/problem-with-scaffold/154465/3 "2008-11-30T03:03:27Z")

</div>

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 -  
> [Ruby on Rails 2.1 - Scaffolding](http://www.tutorialspoint.com/ruby-on-rails-2.1/rails-scaffolding.htm)  
> HTH Dave
> 
> On Nov 30, 9:57ï¿½am, Mrmaster M. \<rails-mailing-l…@andreas-

Thanks for the help and the new tutorial.
