# Newbie Trouble with RubyOnRails Bible

**URL:** <https://www.ruby-forum.com/t/newbie-trouble-with-rubyonrails-bible/176232>\
**Category:** Rails\
**Created:** [September 27, 2009, 2:38pm UTC](https://www.ruby-forum.com/t/newbie-trouble-with-rubyonrails-bible/176232 "2009-09-27T14:38:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arthur\_Fuller](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e56c9b/32.png) [@Arthur\_Fuller](https://www.ruby-forum.com/u/Arthur_Fuller)\
**Post date:** [September 27, 2009, 2:38pm UTC](https://www.ruby-forum.com/t/newbie-trouble-with-rubyonrails-bible/176232/1 "2009-09-27T14:38:03Z")

</div>

Hello all,  
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.

cd rails\_projects  
rails contactlist  
  
ruby script/server webrick  
  
open a cmd window and run mysql: create database  
contactlist\_development;  
use contactlist\_development;  
create table contacts (id int not null auto\_increment, …etc.);  
show tables;  
  
describe contacts;  
  
  
ruby script/generate model Contact  
  
\<look at app/models/contact.rb, which shows:\>  
class Contact \< ActiveRecord:: Base  
end  
ruby script/console  
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.

TIA,  
Arthur

---

<div class="post-metadata">

**Author:** ![Arthur\_Fuller](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e56c9b/32.png) [@Arthur\_Fuller](https://www.ruby-forum.com/u/Arthur_Fuller)\
**Post date:** [September 27, 2009, 2:46pm UTC](https://www.ruby-forum.com/t/newbie-trouble-with-rubyonrails-bible/176232/2 "2009-09-27T14:46:50Z")

</div>

Hi –

On Sun, 27 Sep 2009, Arthur Fuller wrote:

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

When you create the app, you can do:

rails myapp --database=mysql

If you’ve already created the app, do the above on a second app, then  
look at config/database.yml and you’ll see the difference in  
configuration (which you can then adapt for your original app by  
editing its database.yml).

David

–  
David A. Black, Director  
Ruby Power and Light, LLC ([http://www.rubypal.com](http://www.rubypal.com))  
Ruby/Rails training, consulting, mentoring, code review  
Book: The Well-Grounded Rubyist ([The Well-Grounded Rubyist](http://www.manning.com/black2))

---

<div class="post-metadata">

**Author:** ![Arthur\_Fuller](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e56c9b/32.png) [@Arthur\_Fuller](https://www.ruby-forum.com/u/Arthur_Fuller)\
**Post date:** [September 27, 2009, 3:54pm UTC](https://www.ruby-forum.com/t/newbie-trouble-with-rubyonrails-bible/176232/3 "2009-09-27T15:54:09Z")

</div>

Also, after creating the app with the appropriate database selected,  
you will want to confirm the settings in the db configuration file  
“application/config/database.yml”. Specifically check the values for  
“database”, “username”, and “password” that are associated with all 3  
modes (development, test, production).

By the way, “rails --help” will give you a list of all command line  
options.

See also: [http://guides.rubyonrails.org/](http://guides.rubyonrails.org/)

---

<div class="post-metadata">

**Author:** ![Arthur\_Fuller](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/e56c9b/32.png) [@Arthur\_Fuller](https://www.ruby-forum.com/u/Arthur_Fuller)\
**Post date:** [September 27, 2009, 7:17pm UTC](https://www.ruby-forum.com/t/newbie-trouble-with-rubyonrails-bible/176232/4 "2009-09-27T19:17:16Z")

</div>

Here’s a helpful resource:

> **[Getting Started with Rails — Ruby on Rails Guides](https://guides.rubyonrails.org/getting_started.html)**
>
> Getting Started with RailsThis guide covers getting up and running with Ruby on Rails.After reading this guide, you will know: How to install Rails, create a new Rails application, and connect your application to a database. The general layout of a...

search for ‘mysql’ and you’ll find an example configuration.
