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
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
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:
Regards,
Luis
On 5/18/07, Nanyang Z. [email protected] wrote:
exists app/models/
You can try to destroy the model with: ruby script/destroy model Recipe
–
Posted via http://www.ruby-forum.com/.
–
Luis Carraud
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
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. [email protected] wrote:
–
Posted via http://www.ruby-forum.com/.
–
Luis Carraud
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.
Ok. Thanks. I’ll try that…
The tutorial is pretty simple, don’t worry…
Regards,
On 5/18/07, Nanyang Z. [email protected] wrote:
google another scaffolding article, which is easier to follow for you.
–
Posted via http://www.ruby-forum.com/.
–
Luis Carraud
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. [email protected] wrote:
–
Luis Carraud