ONLamp.com Tutorial Trouble


#1

I have installed Ruby on Rails and the latest version of MySQL in my
Windows XP machine and I am following a demo from ONLamp.com
http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=3. I am
3/5 down the page where it says:

“Open a browser and navigate to http://127.0.0.1:3000/recipe/new. You
should see something like Figure 32.”

Instead of a page like Figure 32, I get an error that looks something
like this:

"Mysql::Error in Recipe#new

#28000Access denied for user ‘root’@‘localhost’ (using password: NO)

RAILS_ROOT: ./script/…/config/…"

A friend told me that the latest version of MySQL handles passwords in a
way that is incompatible with the current RoR release. He suggested that
I configure MySQL to use the old password format. Using the MySQL system
tray monitor I configured the instance and set MySQL to use the old
password format. Since that didn’t seem to do the trick, I restarted the
PC. That didn’t do it either, I still get the same error. I checked the
configuration for the instance and the use old passwords setting in the
Security tab is still checked.

I looked at my.ini and at the bottom it reads:

#Use old password encryption method (needed for 4.0 and older clients).
old-passwords”

I am guessing that means MySQL is using the old password format when it
launches the service. Am I right or do I have to force it to read those
settings somehow?

I am beginning to think that my problem is not the old password format
but something else. I have followed the tutorial closely and I don’t
think I have made any mistakes, at least that I didn’t already correct.
What could be causing this error? How do I specify the password so I
can get past this error? What am I missing?

Thanks!


#2

I figured out a way around the problem. I removed the password from the
root account and now the page displays as expected. I still would like
to know how to get the password to go through properly without
generating an error.


#3

Hi Alex,

What password do you have specified for ‘root’ for this database in your
database.yml file?

Bill
----- Original Message -----
From: “Alex Abate” removed_email_address@domain.invalid
To: removed_email_address@domain.invalid
Sent: 2006-03-09 11:26 AM
Subject: [Rails] ONLamp.com Tutorial Trouble


#4

Having just started playing with RoR, I had no idea about this setting.
I had no password in the database.yml file. I didn’t even know to look.
A friend told me about this file and I put the password there. Now I
have a password for root and I don’t get an error.

Thanks,

Bill W. wrote:

Hi Alex,

What password do you have specified for ‘root’ for this database in your
database.yml file?

Bill
----- Original Message -----
From: “Alex Abate” removed_email_address@domain.invalid
To: removed_email_address@domain.invalid
Sent: 2006-03-09 11:26 AM
Subject: [Rails] ONLamp.com Tutorial Trouble