# Ruby on Rails and mySQL

**URL:** <https://www.ruby-forum.com/t/ruby-on-rails-and-mysql/175778>\
**Category:** Rails\
**Created:** [September 19, 2009, 2:30pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-and-mysql/175778 "2009-09-19T14:30:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Artful](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c57346/32.png) [@Artful](https://www.ruby-forum.com/u/Artful)\
**Post date:** [September 19, 2009, 2:30pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-and-mysql/175778/1 "2009-09-19T14:30:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Artful](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c57346/32.png) [@Artful](https://www.ruby-forum.com/u/Artful)\
**Post date:** [September 19, 2009, 2:58pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-and-mysql/175778/2 "2009-09-19T14:58:39Z")

</div>

2009/9/18 Artful [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> 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

---

<div class="post-metadata">

**Author:** ![Artful](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c57346/32.png) [@Artful](https://www.ruby-forum.com/u/Artful)\
**Post date:** [September 19, 2009, 3:32pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-and-mysql/175778/3 "2009-09-19T15:32:01Z")

</div>

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”?
