views:

206

answers:

1

i am new to RoR and following AWDwR book...

all was well till i started the Depot project....

created the products model using

ruby script/generate scaffold product title:string description:text image_url:string

now when i view the page http://localhost:3000/products it shows a generic page with nothing in the list and a link to add new product... when i click this link i get an error..the error is as follows...

undefined method `title' for #<Product:0x596c148>

then i checked the db..it seems there was no title column created at all... did a bit of searching for solutions and have got all the more confused...it appears to be a problem with scaffolding and version problems...

thanks in advance...

+1  A: 

Perhaps you still need to run the migration? Try this:

rake db:migrate
Gordon Isnor
hey..it worked...thanks...
ZX12R