Women in Technology

Hear us Roar



Article:
  Rolling with Ruby on Rails
Subject:   ActiveRecord::RecordNotFound in RecipeController#show
Date:   2006-12-11 14:38:18
From:   jshphoto
First off, Since MySql Front is no longer available and HeidiSql is only for PC, I have been using a program called YourSql for mac which I'm told is essentially the same. One problem I have encountered is that it does not automatically set the "id" field as the primary key. I'm not sure if this is the reason why when I try to complete the step where we assign a category to each recipe and then try to edit the recipe from the ...recipe/list page I get the following error.


" ActiveRecord::RecordNotFound in RecipeController#show"


"Couldn't find Recipe without an ID"
"RAILS_ROOT: /Users/jameshouser/Sites/cookbook3/public/../config/.."


*Keep in mind that I am calling my project cookbook3 and not just cookbook*


All that I can think of is that this is occurring because of the "id" vs. "Id" thing.


Any advice?


Much appreciation.
Stephen

Main Topics Oldest First

Showing messages 1 through 2 of 2.

  • ActiveRecord::RecordNotFound in RecipeController#show
    2006-12-11 20:25:17  jshphoto [View]

    That worked!
  • Curt Hibbs photo ActiveRecord::RecordNotFound in RecipeController#show
    2006-12-11 14:49:15  Curt Hibbs | O'Reilly AuthorO'Reilly Blogger [View]

    Just make sure your create a integer field named "id" (all lower case) that is auto-increment and primary the key.