Greetings all, I''m sure there is probably a very obvious reason for the following problem. However, after much hair pulling, I am just not seeing it yet. As you can see from the trace below, I am not able to complete scaffold generation due to some problem between rails and mysql. I double checked MySQL to make sure both my Ruby user and Root user have full rights to the database. However, for some reason "C:> generate scaffold User Admin::User" always hangs up right after "create test/fixtures/users.yml" Any ideas why this might be happening or how it might be fixed would be greatly appreciated. THNX> generate scaffold User Admin::Usercreate app/controllers/admin create app/helpers/admin create app/views/admin/user create test/functional/admin dependency model exists app/models/ exists test/unit/ exists test/fixtures/ create app/models/user.rb create test/unit/user_test.rb create test/fixtures/users.yml #28000Access denied for user ''root''@''localhost'' (using password: NO) -- Posted via http://www.ruby-forum.com/.
Does your database.yml file have the correct login information for user root? On 5/3/06, doug meharry <doug@dmeharry.com> wrote:> Greetings all, > > I''m sure there is probably a very obvious reason for the following > problem. However, after much hair pulling, I am just not seeing it yet. > As you can see from the trace below, I am not able to complete scaffold > generation due to some problem between rails and mysql. I double > checked MySQL to make sure both my Ruby user and Root user have full > rights to the database. However, for some reason "C:> generate > scaffold User Admin::User" always hangs up right after "create > test/fixtures/users.yml" > > Any ideas why this might be happening or how it might be fixed would be > greatly appreciated. > > THNX > > > generate scaffold User Admin::User > create app/controllers/admin > create app/helpers/admin > create app/views/admin/user > create test/functional/admin > dependency model > exists app/models/ > exists test/unit/ > exists test/fixtures/ > create app/models/user.rb > create test/unit/user_test.rb > create test/fixtures/users.yml > #28000Access denied for user ''root''@''localhost'' (using password: NO) > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Ben Reubenstein 303-947-0446 http://www.benr75.com
Hey Doug, you simply need to add the password to your .yml file. Peace, -Conrad On 5/3/06, Ben Reubenstein <benr@x-cr.com> wrote:> > Does your database.yml file have the correct login information for user > root? > > On 5/3/06, doug meharry <doug@dmeharry.com> wrote: > > Greetings all, > > > > I''m sure there is probably a very obvious reason for the following > > problem. However, after much hair pulling, I am just not seeing it yet. > > As you can see from the trace below, I am not able to complete scaffold > > generation due to some problem between rails and mysql. I double > > checked MySQL to make sure both my Ruby user and Root user have full > > rights to the database. However, for some reason "C:> generate > > scaffold User Admin::User" always hangs up right after "create > > test/fixtures/users.yml" > > > > Any ideas why this might be happening or how it might be fixed would be > > greatly appreciated. > > > > THNX > > > > > generate scaffold User Admin::User > > create app/controllers/admin > > create app/helpers/admin > > create app/views/admin/user > > create test/functional/admin > > dependency model > > exists app/models/ > > exists test/unit/ > > exists test/fixtures/ > > create app/models/user.rb > > create test/unit/user_test.rb > > create test/fixtures/users.yml > > #28000Access denied for user ''root''@''localhost'' (using password: NO) > > > > > > -- > > Posted via http://www.ruby-forum.com/. > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > -- > Ben Reubenstein > 303-947-0446 > http://www.benr75.com > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060503/5fcf266f/attachment.html
Conrad Taylor wrote:> Hey Doug, you simply need to add the password to your .yml file. > > Peace, > > -ConradThanks guys! After an hour off I came back and realized (1) the .yml file I wanted to use was in the wrong folder(I screwed up and copied one from another working project to the DB folder instead of the environments folder; and (2) the .yml file in the environments folder was trying to use the "root" user account to access the database instead of the "ruby" user I had set up specifically for the purpose. For some reason it seems Ruby and MySQL don''t play well together on Windows XP systems so one needs to employ a user account that does not have a password(as shown below). Anyhow, problem solved. Doug Below is an excerpt from "database.yml" file -- note this works: development: adapter: mysql database: mydatabase_development username: ruby2 password: -- Posted via http://www.ruby-forum.com/.
On Thu, 4 May 2006, doug meharry wrote:> For some reason it seems Ruby > and MySQL don''t play well together on Windows XP systems so one needs to > employ a user account that does not have a password(as shown below).I''m using Rails on XP with MySQL with users that have passwords, so there has to be something else going on there. My database.yml looks like this: development: adapter: mysql database: project_dev username: devuser password: qwertyy host: localhost (I did change the values of the fields. What good is having a password if you go and post it to the Internet? =). ) Passwords and mysql work fine for me under XP on several projects. All I can suggest is to try the user and password from the command line to make sure they''re right, and to see if you have any funny characters that YAML might not like. I''ve been bit by both of these recently. (I can never get mysql''s security right on the first try.)> Anyhow, problem solved.Glad to hear it. It''s amazing what taking a break can do for you sometimes. =) -- Louis Erickson - lerickson@rdwarf.net - http://www.rdwarf.com/~wwonko/ I have discovered the art of deceiving diplomats. I tell them the truth and they never believe me. -- Camillo Di Cavour
Louis Erickson wrote:> All I can suggest is to try the user and password from the command line to > make sure they''re right, and to see if you have any funny characters that > YAML might not like. I''ve been bit by both of these recently. (I can > never get mysql''s security right on the first try.)Also to bear in mind is the password format change from 4.0 to 4.1. Probably not relevant, but you never know... -- Alex
Alex Young wrote:> Louis Erickson wrote: >> All I can suggest is to try the user and password from the command line to >> make sure they''re right, and to see if you have any funny characters that >> YAML might not like. I''ve been bit by both of these recently. (I can >> never get mysql''s security right on the first try.) > Also to bear in mind is the password format change from 4.0 to 4.1. > Probably not relevant, but you never know...Alex and Louis, I think there may be an issue between RoR and MySQL version 4.1 (the version I am running). I also seem to recall some posts here about this problem and that it seems to only occur on Windows systems (big surprise huh?). When I specify a password for my "ruby" user, I get the following error message from RoR: 28000 Access denied for user ''ruby''@''localhost'' (using password: NO) When I take the password out (both in MySQL and RoR of course) everything works fine. Of course, security sucks, but then again this is just a development environment. Deployment will most likely be on a Linux box, so I don''t think (or at least I hope) this will not be a problem. Also, it is one of those things that might get taken care of well before I am ready to deploy. Doug -- Posted via http://www.ruby-forum.com/.