N00b question


#1

Total Ruby N00b here with a question about the Hibbs OnLamp tutorial.

I’m trying to hook up to my cookbook database and I’m getting:

ActiveRecord::StatementInvalid in Recipe#index
Mysql::Error: #42S02Table ‘cookbook.recipes’ doesn’t exist: SELECT
COUNT(*)
FROM recipes
RAILS_ROOT: ./script/…/config/…

My thoughts:
I think I’m not actually connecting to MySQL.

My database.yml looks like this for tutorial purposes:

development:
adapter: mysql
database: cookbook
username: root
password:

test:
adapter: mysql
database: cookbook
username: root
password:

production:
adapter: mysql
database: cookbook
username: root
password:

I’m running on windoze for testing and development purposes.

I’m using SQLFront for database creation and admin.

I can log in and see everything and I can see the data source and tables
in
radrails as well.

Just can’t connect.

thoughts?

Thanks in advance for helping the noobie. I’m excited about rails and
ruby
and want to get past this hello world stuff into a database app as
quickly
as possible.

Any help is appreciated,

Joshua


#2

It connecting to the database alright (you’d get a different message
if that was failing). The error message is tell you that the table
“cookbook.recipes” does not exist.

Double check you spelling of the database (“cookbook”) and the table
(“recipes”).

Curt


#3

Told you I was a n00b!.

That was it, a typo. Reminds me of when I started trying to do Perl and
got
my paths wrong…

Sheesh.

Thank you Mr. Hibbs. Your tutorial on RoR is the best one I’ve come
across.
I’m looking forward to other stuff from you on RoR.

Blessings,


Joshua Burke
Web M.
Heartland AEA 11