# Depot example error

**URL:** <https://www.ruby-forum.com/t/depot-example-error/68228>\
**Category:** Rails\
**Created:** [September 10, 2006, 8:53pm UTC](https://www.ruby-forum.com/t/depot-example-error/68228 "2006-09-10T20:53:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 10, 2006, 8:53pm UTC](https://www.ruby-forum.com/t/depot-example-error/68228/1 "2006-09-10T20:53:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 10, 2006, 9:29pm UTC](https://www.ruby-forum.com/t/depot-example-error/68228/2 "2006-09-10T21:29:27Z")

</div>

2006/9/10, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 10, 2006, 9:29pm UTC](https://www.ruby-forum.com/t/depot-example-error/68228/3 "2006-09-10T21:29:27Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 11, 2006, 1:39am UTC](https://www.ruby-forum.com/t/depot-example-error/68228/4 "2006-09-11T01:39:46Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 12, 2006, 12:29am UTC](https://www.ruby-forum.com/t/depot-example-error/68228/5 "2006-09-12T00:29:22Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [September 11, 2006, 4:40am UTC](https://www.ruby-forum.com/t/depot-example-error/68228/6 "2006-09-11T04:40:03Z")

</div>

On Sep 10, 2006, at 18:28, removed\_email\_address@domain.invalid wrote:

> 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.

Is the table name plural?

Dave
