Rails -> add a column -> NoMethodError in Admin#edit

[While I try to get on the Rails mailing list here…]

Rubies:

I am a Ruby on Rails newbie, and have been reading the book, “Agile Web
Development with Rails”, by Thomas & Hansson.

I seem to be stuck on page 61. The shtick is we create a database table,
then go back and add a column. The column appears fine in my SQLite3
database, and I used its test fixture to populate the column.

Then to rebuild the table’s admin interface, I invoke “ruby
script/generate
scaffold Product Admin”… But the new column does not show up on the
/admin/show/1 page, and /admin/edit/1 complains like this:

----8<---------------------------------

NoMethodError in Admin#edit

Showing app/views/admin/_form.rhtml where line #17 raised:

undefined method `strength’ for #Champ:0xb742ca68

Extracted source (around line #17):

14: <%= text_field ‘champ’, ‘account’ %>


15:
16:

Strength

17: <%= text_field ‘champ’, ‘strength’ %>


18:
19:

Trace of template inclusion: /app/views/admin/edit.rhtml

----8<---------------------------------

Now because I naturally don’t understand the entire stack yet, I don’t
know
how to work-around this, or how to fix it directly. Any help?

Phlip wrote:

I am a Ruby on Rails newbie, and have been reading the book, “Agile Web
Development with Rails”, by Thomas & Hansson.

Oookay - the book told me I rarely need to restart the server. (It’s
Webrick, so maybe it carries more state than it should!)

I bounce the server and the problem goes away.

A digression about Rails and this book: When Dave and … Dave wrote
this
book, they knew their target audience would consist mostly of developers
experienced with writing websites using Brand X.

Under Brand X, you must write endless rendundant boilerplate code to get
anything done. So for each website construction step, /Agile…Rails/
typically announces all the stuff that you don’t need to do, such as
write
database connection systems from scratch, construct SQL statements from
huge
strings, squeeze together MVC yourself…

…or bounce the friggin’ server. So now I know to bounce it after
changing
the schema. The book probably says that somewhere…