Sign In/My Account | View Cart  

advertisement

AddThis Social Bookmark Button

Article:
  Rolling with Ruby on Rails Revisited
Subject:   trouble creating a new category
Date:   2009-03-16 10:56:34
From:   rnesson
Hi,


I've been following the tutorial using an install of Locomotive 2.0.8. I got all the way through to the part where CB tells his boss to create a new category. When I type in main course and try to create the category, I get the following error:


ActiveRecord::StatementInvalid in CategoryController#create


SQLite3::SQLException: SQL logic error or missing database: INSERT INTO categories ("name") VALUES('main course')


Earlier in the tutorial I discovered that my database.yml file was different than what seemed to be expected in the tutorial in that it was using sqlite3 instead of mysql. so i used sqlite3 to create the database and once i did that in the db directory i was able to successfully run the scaffolding commands (which I was not able to complete until I made this change). The category and recipe pages seemed to be generated correctly. The database definitely exists and contains the recipes and categories tables.


Any idea what is causing this error?