Sign In/My Account | View Cart  

advertisement

AddThis Social Bookmark Button

Article:
  Rolling with Ruby on Rails Revisited
Subject:   Rolling with Rails 2.0 - Problem
Date:   2008-03-24 09:23:22
From:   Renwill
Followed the tutorial using Rails 2.0 up to the scaffolding. Then I hit problems. Please kindly help.
==
C:\ruby\rails_apps\cookbook2>ruby script\generate recipes id:integer category_id:integer title:string description:string date:datetime instructions:text


Couldn't find 'recipes' generator


C:\ruby\rails_apps\cookbook2>ruby script\generate categories id:integer name:string


Couldn't find 'categories' generator
==

Full Threads Oldest First

Showing messages 1 through 3 of 3.

  • Rolling with Rails 2.0 - Problem
    2008-03-24 09:55:12  iENG [View]

    You should try using the singular forms, category and recipe. When you access the controllers for each on your server you would then use the plurals categories and recipes.

    Regards,
    iENG
    • Rolling with Rails 2.0 - Problem
      2008-03-27 19:05:59  mobopro [View]

      In addition to that, don't forget the 'scaffold' term, i.e.:

      ruby script/generate scaffold recipe etc etc.

      I'm feeling my way through the tutorial, too, in 2.0... I hope it gets updated soon.
      • Rolling with Rails 2.0 - Problem
        2008-03-28 22:06:45  Renwill [View]

        Many thanks for the help. Finally got it. But don't understand why the singular form should be used.

        C:\ruby\rails_apps\cookbook2>ruby script\generate scaffold recipe category_id:integer title:string description:string date:date instructions:text

        C:\ruby\rails_apps\cookbook2>ruby script\generate scaffold category id:integer name:string