Lee McKusick
2006-Aug-24 00:42 UTC
[Rails] AWDWR chapter 10 page 116, need to run script/generate model Orders here? Tutorial puzzle.
Puzzled if the book has skipped a "script/generate" step. Doing the "Shipping" example in chapter 10 page 116 AWDWR second edition of the book. getting a mysql database error "Mysql::Error: Unknown column ''line_items.order_id'' in ''where clause'': SELECT * FROM line_items WHERE (line_items.order_id = 1) " And sure enough, the line_items table has no order_id value. I tried running ruby script/generate model Order but the script wants to overwrite orders.rb (which has several items in it already). --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
chris
2006-Aug-24 01:26 UTC
[Rails] Re: AWDWR chapter 10 page 116, need to run script/generate model Orders here? Tutorial puzzle.
are you missing the belongs_to :orders at the top of the line_items model file? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---