I just picked up a copy of the rails 2.0 (hammock?) book and I was playing with the Depot application using mysql. I did the following.
mysqladmin -u root create depot_development cd depot (I edited config/database.yml and commented out the line that says “encoding: utf8” ruby script/generate scaffold product title:string description:text image_url:string rake db:migrate
and I got the following error:
== 1 CreateProducts: migrating ================================================
Mysql::Error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ‘ENGINE=InnoDB’ at line 1: CREATE TABLE
id int(11) DEFAULT NULL auto_increment PRIMARY KEY,
title varchar(255) DEFAULT NULL,
description text DEFAULT NULL,
image_url varchar(255) DEFAULT NULL,
created_at datetime DEFAULT NULL,
updated_at datetime DEFAULT NULL) ENGINE=InnoDB
What am I missing here? It seems that mysql is not configured for InnoDB and rails is using that?