I''m new to RoR so please forgive this trivial question. I''m working through Timothy Fisher''s Ruby on Rails Bible, I have the components up and running. I have created the contactlist database and within it the contacts table. I then follow the instructions on page 81: ruby script/console my_contact = Contact.new It''s supposed to respond with a message describing the attributes of the Contact class, but instead it tells me that it cannot find the contacts_development database. It is there, as shown by the mysql console app. What am I doing wrong? Should I have created the database in some particular directory rather than just leave it to mySQL to figure out where to place it? Thanks in advance, Arthur
2009/9/18 Artful <fuller.artful-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> > I''m new to RoR so please forgive this trivial question. I''m working > through Timothy Fisher''s Ruby on Rails Bible, I have the components up > and running. I have created the contactlist database and within it the > contacts table. I then follow the instructions on page 81: > > ruby script/console > my_contact = Contact.new > > It''s supposed to respond with a message describing the attributes of > the Contact class, but instead it tells me that it cannot find the > contacts_development database. It is there, as shown by the mysql > console app. What am I doing wrong? Should I have created the database > in some particular directory rather than just leave it to mySQL to > figure out where to place it? >Can you show us your database.yml and details of the error displayed? Colin
How did you create the contacts table? Do you have the mysql gem installed? What is the response when, in your app directory, you type: "script/ about"? On Sep 18, 5:04 pm, Artful <fuller.art...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m new to RoR so please forgive this trivial question. I''m working > through Timothy Fisher''s Ruby on Rails Bible, I have the components up > and running. I have created the contactlist database and within it the > contacts table. I then follow the instructions on page 81: > > ruby script/console > my_contact = Contact.new > > It''s supposed to respond with a message describing the attributes of > the Contact class, but instead it tells me that it cannot find the > contacts_development database. It is there, as shown by the mysql > console app. What am I doing wrong? Should I have created the database > in some particular directory rather than just leave it to mySQL to > figure out where to place it? > > Thanks in advance, > Arthur