I am new to RoR and am working my way through Timothy Fisher’s Ruby On Rails Bible. I’m stuck on page 81. I have followed the steps leading to this page, i.e.
ruby script/server webrick
open a cmd window and run mysql: create database contactlist_development;
create table contacts (id int not null auto_increment, …etc.);
ruby script/generate model Contact
<look at app/models/contact.rb, which shows:>
class Contact < ActiveRecord:: Base
Loading development environment
my_contact = Contact.new
<here’s the problem: instead of showing me the attributes of the instance, I get the message:
ActiveRecord::StatementInvalid: Could not find table ‘contacts’ from c:\program files\BitNami RubyStack/ruby/lib/ruby/gems… etc… and many other error messages too.
Ohhh! I just noticed that another of the error messages indicates that it is looking for a sqlite3_adapter.rb:29. Hmmm. How do I tell it that I’m using mySQL not sqlite?
For most or all of you, this is probably a trivial question, but for me it is a show stopper. I’m very excited by the language and the framework and the book, but at the moment I’m slamming my forehead on this wall. Please help.