Through the Depot Example I built a nice platform, skipped the Ajax part (since I didn’t want my cart there) but still created the partials (_cart,_line_item). Anyways, when I start working on the Orders section and run the scaffold, and migrate I get 45 errors stating “ActiveRecord::StatementInvalid: Could not find table ‘line_items’” and “NoMethodError: undefined method `each’ for nil:NilClass” any ideas?? Thanks a lot!
I had the same issue, look at the following
1) on page 159, make sure that you have entered “rails generate migration add_order_to_line_item order:references” correctly, my problem was that I left the s off “:references”. if you have done the same, do the following, a) rails destroy migration add_order_to_line_item b) rails generate migration add_order_to_line_item order:references c) rake db:migrate:reset d) rake db:seed
Hope this help