# Help using Scaffolds

**URL:** <https://discuss.rubyonrails.org/t/help-using-scaffolds/9115>\
**Category:** rubyonrails-talk\
**Created:** [February 21, 2007, 8:53pm UTC](https://discuss.rubyonrails.org/t/help-using-scaffolds/9115 "2007-02-21T20:53:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![untitled](https://avatars.discourse-cdn.com/v4/letter/u/7ab992/32.png) [@untitled](https://discuss.rubyonrails.org/u/untitled)\
**Post date:** [February 21, 2007, 8:53pm UTC](https://discuss.rubyonrails.org/t/help-using-scaffolds/9115/1 "2007-02-21T20:53:14Z")

</div>

Hi

Im just starting out with rails. Im having some problems running scaffolds.

I've created my project, set me databases as SQLight and ran the migration: ruby script/generate migration add\_a\_new\_table

Then edited the code in db/migrate/001\_add\_a\_new\_table to:

class AddANewTable \< ActiveRecord::Migration

&nbsp;&nbsp;def self.up &nbsp;&nbsp;&nbsp;&nbsp;create\_table :users do |table| &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;table.column :name, :string &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;table.column :address, :string &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;table.column :postcode, :string &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;table.column :country, :string &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;table.column :phone, :string &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;table.column :email, :string

&nbsp;&nbsp;&nbsp;&nbsp;end &nbsp;&nbsp;end

&nbsp;&nbsp;def self.down &nbsp;&nbsp;&nbsp;&nbsp;drop\_table :users &nbsp;&nbsp;end end

When I try to run script/generate scaffold users it results in errors. Am I using scaffolds wrong? Any help appreciated.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Glenn5](https://avatars.discourse-cdn.com/v4/letter/g/9e8a1a/32.png) [@Glenn5](https://discuss.rubyonrails.org/u/Glenn5)\
**Post date:** [February 21, 2007, 10:11pm UTC](https://discuss.rubyonrails.org/t/help-using-scaffolds/9115/2 "2007-02-21T22:11:02Z")

</div>

What were the errors?

---

<div class="post-metadata">

**Author:** ![untitled](https://avatars.discourse-cdn.com/v4/letter/u/7ab992/32.png) [@untitled](https://discuss.rubyonrails.org/u/untitled)\
**Post date:** [February 22, 2007, 9:46am UTC](https://discuss.rubyonrails.org/t/help-using-scaffolds/9115/3 "2007-02-22T09:46:27Z")

</div>

undefined users, or something like that. I'll paste the exact errors later today.

am I right in how im going about this? i mean the scaffold to create that table would be 'script/generate scaffold users' ?

thanks for now!
