# Error in the tutorial?

**URL:** <https://www.ruby-forum.com/t/error-in-the-tutorial/104486>\
**Category:** Rails\
**Created:** [May 18, 2007, 4:48pm UTC](https://www.ruby-forum.com/t/error-in-the-tutorial/104486 "2007-05-18T16:48:32Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luis\_Carraud](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/977dab/32.png) [@Luis\_Carraud](https://www.ruby-forum.com/u/Luis_Carraud)\
**Post date:** [May 18, 2007, 4:48pm UTC](https://www.ruby-forum.com/t/error-in-the-tutorial/104486/1 "2007-05-18T16:48:32Z")

</div>

Hello everyone!!!

I’m new to Rails… I’m trying to follow the first tutorial steps, but  
I came across this error:

D:\InstantRails\rails\_apps\cookbook2\>ruby script\generate scaffold  
recipe recipe

```
  exists app/controllers/
  exists app/helpers/
  exists app/views/recipe
  exists app/views/layouts/
  exists test/functional/

```

dependency model  
exists app/models/  
exists test/unit/  
exists test/fixtures/  
identical app/models/recipe.rb  
identical test/unit/recipe\_test.rb  
identical test/fixtures/recipes.yml  
error Before updating scaffolding from new DB schema, try  
creating a tab  
le for your model (Recipe)

Any ideas?

Thanks in advance!  
Luis

---

<div class="post-metadata">

**Author:** ![Luis\_Carraud](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/977dab/32.png) [@Luis\_Carraud](https://www.ruby-forum.com/u/Luis_Carraud)\
**Post date:** [May 18, 2007, 5:20pm UTC](https://www.ruby-forum.com/t/error-in-the-tutorial/104486/2 "2007-05-18T17:20:47Z")

</div>

Luis Carraud wrote:

> ```
> exists app/controllers/
> exists app/helpers/
> exists app/views/recipe
> exists app/views/layouts/
> exists test/functional/
> 
> ```
> 
> dependency model  
> exists app/models/  
> exists test/unit/  
> exists test/fixtures/

> Any ideas?
> 
> Thanks in advance!  
> Luis

it seems you’d generated model Recipe before you tried to generate a  
scaffold.  
You can try to destroy the model with: ruby script/destroy model Recipe

---

<div class="post-metadata">

**Author:** ![Luis\_Carraud](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/977dab/32.png) [@Luis\_Carraud](https://www.ruby-forum.com/u/Luis_Carraud)\
**Post date:** [May 18, 2007, 5:39pm UTC](https://www.ruby-forum.com/t/error-in-the-tutorial/104486/3 "2007-05-18T17:39:41Z")

</div>

Dear Nanyang

Thank you very much for your help 🙂

However, it’s no use: I destroyed both models (category and recipe), and  
tried to follow the tutorial, but i get the same error ☹

The tutorial I’m following is:

> **[Radar - O’Reilly](https://www.oreilly.com/radar/)**
>
> Now, next, and beyond: Tracking need-to-know trends at the intersection of business and technology

> **[Radar - O’Reilly](https://www.oreilly.com/radar/)**
>
> Now, next, and beyond: Tracking need-to-know trends at the intersection of business and technology

Regards,  
Luis

On 5/18/07, Nanyang Z. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > ```
> > exists app/models/
> > 
> > ```
> 
> You can try to destroy the model with: ruby script/destroy model Recipe
> 
> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> >

–

Luis Carraud

---

<div class="post-metadata">

**Author:** ![Luis\_Carraud](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/977dab/32.png) [@Luis\_Carraud](https://www.ruby-forum.com/u/Luis_Carraud)\
**Post date:** [May 18, 2007, 5:48pm UTC](https://www.ruby-forum.com/t/error-in-the-tutorial/104486/4 "2007-05-18T17:48:00Z")

</div>

Luis Carraud wrote:

> However, it’s no use: I destroyed both models (category and recipe), and  
> tried to follow the tutorial, but i get the same error ☹  
> …  
> something may have been messed up.  
> maybe it’s time to start a new project and try this scaffold magic.

---

<div class="post-metadata">

**Author:** ![Luis\_Carraud](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/977dab/32.png) [@Luis\_Carraud](https://www.ruby-forum.com/u/Luis_Carraud)\
**Post date:** [May 18, 2007, 6:08pm UTC](https://www.ruby-forum.com/t/error-in-the-tutorial/104486/5 "2007-05-18T18:08:46Z")

</div>

Hi Luis,

Luis Carraud wrote:

> I’m new to Rails… I’m trying to follow the first tutorial steps,  
> but I came across this error:  
> Before updating scaffolding from new DB schema, try  
> creating a table for your model (Recipe)

Rails is telling you that it can’t find your Recipes table. Make sure  
you  
do, in fact have one and that it’s named Recipes. It needs to be  
plural.  
Rails is also telling you that you’ve already got a recipe.rb model.  
You  
need to delete that file. The only other time I remember a reader  
having  
this problem, he’d forgotten to save his create.sql script. When he ran  
the  
script it didn’t complain but, in fact, no table had been created.

hth,  
Bill

---

<div class="post-metadata">

**Author:** ![Luis\_Carraud](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/977dab/32.png) [@Luis\_Carraud](https://www.ruby-forum.com/u/Luis_Carraud)\
**Post date:** [May 18, 2007, 6:00pm UTC](https://www.ruby-forum.com/t/error-in-the-tutorial/104486/6 "2007-05-18T18:00:44Z")

</div>

Oh… Good idea… now… how do I delete cookbook2 project? Just delete  
the  
directory? Or is there a command line option to delete/destroy it?

Thanks,

On 5/18/07, Nanyang Z. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> >

–

Luis Carraud

---

<div class="post-metadata">

**Author:** ![Luis\_Carraud](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/977dab/32.png) [@Luis\_Carraud](https://www.ruby-forum.com/u/Luis_Carraud)\
**Post date:** [May 18, 2007, 6:29pm UTC](https://www.ruby-forum.com/t/error-in-the-tutorial/104486/7 "2007-05-18T18:29:05Z")

</div>

Luis Carraud wrote:

> Oh… Good idea… now… how do I delete cookbook2 project? Just delete  
> the  
> directory? Or is there a command line option to delete/destroy it?

You can delete the directory.

And note what Bill said, you may need to check the tutorial again, or  
google another scaffolding article, which is easier to follow for you.

---

<div class="post-metadata">

**Author:** ![Luis\_Carraud](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/977dab/32.png) [@Luis\_Carraud](https://www.ruby-forum.com/u/Luis_Carraud)\
**Post date:** [May 18, 2007, 7:29pm UTC](https://www.ruby-forum.com/t/error-in-the-tutorial/104486/8 "2007-05-18T19:29:56Z")

</div>

Ok. Thanks. I’ll try that…

The tutorial is pretty simple, don’t worry…

Regards,

On 5/18/07, Nanyang Z. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> google another scaffolding article, which is easier to follow for you.
> 
> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> >

–

Luis Carraud

---

<div class="post-metadata">

**Author:** ![Luis\_Carraud](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/977dab/32.png) [@Luis\_Carraud](https://www.ruby-forum.com/u/Luis_Carraud)\
**Post date:** [May 18, 2007, 7:29pm UTC](https://www.ruby-forum.com/t/error-in-the-tutorial/104486/9 "2007-05-18T19:29:56Z")

</div>

Bill

Thank you very much for your help.

The recipes and categories tables are created (I know about MySQL  
believe  
me). And I saved the create.sql script.

I’ll try beginning the tutorial all over again and let you know…

Regards,

On 5/18/07, Bill W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> >

–

Luis Carraud
