I just recently started having issues running unit tests for my application, but can''t figure out why. When I run rake test:units, I get "Access denied for user ''root@localhost'' using password: NO". My database.yml file is configured to use the ODBC login, but it''s not being passed to my unit tests. Any ideas? development: adapter: mysql encoding: utf8 database: db_development username: ODBC password: socket: /tmp/mysql.sock test: adapter: mysql encoding: utf8 database: db_test username: ODBC password: socket: /tmp/mysql.sock -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
U have odbc as the user for test db. But u have root as user in mysql. Either change odbc to root or create odbc user in mysqladmin. Http://www.rubyplus.org Free Ruby & Rails screencasts On Apr 5, 2008, at 2:19 PM, Becca Girl <rails-mailing-list@andreas- s.net> wrote:> > I just recently started having issues running unit tests for my > application, but can''t figure out why. When I run rake test:units, I > get "Access denied for user ''root@localhost'' using password: NO". > > My database.yml file is configured to use the ODBC login, but it''s not > being passed to my unit tests. Any ideas? > > development: > adapter: mysql > encoding: utf8 > database: db_development > username: ODBC > password: > socket: /tmp/mysql.sock > > test: > adapter: mysql > encoding: utf8 > database: db_test > username: ODBC > password: > socket: /tmp/mysql.sock > -- > Posted via http://www.ruby-forum.com/. > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Bcp wrote:> U have odbc as the user for test db. But u have root as user in mysql. > Either change odbc to root or create odbc user in mysqladmin.I have both the root and ODBC users set up in mysql. I thought that the database.yml file would tell the tests to use the ODBC user instead of the root user. Is there some other location where the test is getting the user? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
After digging around the environment was being set in another spot, so as soon as I commented that out, everything worked great. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---