Depot example error

I am learning Rails using the Agile Web Dev book. I am getting the following error.

ruby script/generate scaffold Product Admin

      exists app/controllers/       exists app/helpers/       exists app/views/admin       exists test/functional/   dependency model       exists app/models/       exists test/unit/       exists test/fixtures/    identical app/models/product.rb    identical test/unit/product_test.rb    identical test/fixtures/products.yml        error Before updating scaffolding from new DB schema, try creating a table for your model (Product)

Any ideas? Thanks.

You have to create the database & populate it with the table before generating a scaffold. If you already created the database, doublcheck your database.yml file to make sure it's pointing to the right location. What does your database.yml file have in it?

I am learning Rails using the Agile Web Dev book. I am getting the following error.

ruby script/generate scaffold Product Admin

  exists  app/controllers/
  exists  app/helpers/
  exists  app/views/admin

  exists  test/functional/

dependency model exists app/models/ exists test/unit/ exists test/fixtures/ identical app/models/product.rb identical test/unit/product_test.rb

identical test/fixtures/products.yml error Before updating scaffolding from new DB schema, try creating a table for your model (Product)

Any ideas? Thanks.

I have a database and my database.yml is being used. If I change the user/password in the .yml I get an Access denied message when running the same script.

Patrick Elder wrote:

Is the table name plural?

Dave

Thanks all for your replies. I scrapped the DB and started again - all is working now. I believe I had set something wroing in the user authentication.