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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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! > Luisit 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 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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: http://www.onlamp.com/pub/a/onlamp/2006/12/14/revisiting-ruby-on-rails-revisited.html http://www.onlamp.com/pub/a/onlamp/2007/01/05/revisiting-ruby-on-rails-revisited-2.html Regards, Luis On 5/18/07, Nanyang Zhan <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > 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 > > -- > Posted via http://www.ruby-forum.com/. > > > >-- Luis Carraud --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 Zhan <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > 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. > > -- > Posted via http://www.ruby-forum.com/. > > > >-- Luis Carraud --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 Walton <bill.walton-xwVYE8SWAR3R7s880joybQ@public.gmane.org> wrote:> > > 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 > > > > > >-- Luis Carraud --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ok. Thanks. I''ll try that... The tutorial is pretty simple, don''t worry... Regards, On 5/18/07, Nanyang Zhan <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > 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. > > > > -- > Posted via http://www.ruby-forum.com/. > > > >-- Luis Carraud --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---