RichardOnRails
2008-Jun-10 00:28 UTC
rails xxx database=mysql produces invalid database.yml under Windows
Hi All, For days, I''ve been trying to get rake db:migration to work. My first error was pointed out to my on this NG: I was using a dot rather than colon in the rake command. My second error led me to conclude that their a problem in the rails command. I must be wrong, because there must be thousands or Rails on Windows users out there. But I can''t see it. I ran the command: C:\>rails var\www\cookbook --database=mysql The generated C:\var\www\cookbook\config\database.yml has a space character following the colons in the non-comment statements. I confirmed this by viewing database.yml both with: - Notepad - XVI32.exe ( Hex editor which showed the char following the ":" were 0x20 == ASCII Space) I was led to this fact when I subsequently ran the following command and got results in a Command Window: C:\var\www\cookbook>ruby script/generate migration K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ activerecord-2.0.2/lib/active_record/connection_adapters/abstract/ connection_specification.rb :217:in `establish_connection'': adapter:mysql encoding:utf8 database:cookbook_development username:root password:beer host:localhost database is not configured (ActiveRecord::AdapterNotSpecified) I''m running: - Rails 2.0.2 run over - ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] on top of - WinXP-Pro/SP2 Thanks in Advance for any observations any of you might have. Best wishes, Richard --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
RichardOnRails
2008-Jun-10 03:22 UTC
Re: rails xxx database=mysql produces invalid database.yml under Windows
Hi All, Please ignore everything I said. Somehow, I cleaned up my act (so far) and got a skeleton migration running. I''ll probably screw-up something else as I continue this effort, but I can go to bed happily tonight. Best wishes, Richard On Jun 9, 8:28 pm, RichardOnRails <RichardDummyMailbox58...-gP6xRNRnnqSxhq/XJNNIW0EOCMrvLtNR@public.gmane.org> wrote:> Hi All, > > For days, I''ve been trying to get rake db:migration to work. > > My first error was pointed out to my on this NG: I was using a dot > rather than colon in the rake command. > > My second error led me to conclude that their a problem in the rails > command. I must be wrong, because there must be thousands or Rails > on Windows users out there. But I can''t see it. > > I ran the command: > > C:\>rails var\www\cookbook --database=mysql > > The generated C:\var\www\cookbook\config\database.yml has a space > character following the colons in the non-comment statements. I > confirmed this by viewing database.yml both with: > - Notepad > - XVI32.exe ( Hex editor which showed the char following the ":" were > 0x20 == ASCII Space) > > I was led to this fact when I subsequently ran the following command > and got results in a Command Window: > > C:\var\www\cookbook>ruby script/generate migration > K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ > activerecord-2.0.2/lib/active_record/connection_adapters/abstract/ > connection_specification.rb > :217:in `establish_connection'': adapter:mysql encoding:utf8 > database:cookbook_development username:root password:beer > host:localhost database is not configured > (ActiveRecord::AdapterNotSpecified) > > I''m running: > - Rails 2.0.2 run over > - ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] on top of > - WinXP-Pro/SP2 > > Thanks in Advance for any observations any of you might have. > > Best wishes, > Richard--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
RichardOnRails
2008-Jun-11 18:00 UTC
Re: rails xxx database=mysql produces invalid database.yml under Windows
Hi All, I finally discovered what was causing me to go crazy, causing me to post several false alarms. My Rake installation was corrupted. Once I reinstalled, all my problems disappeared. Best wishes, Richard On Jun 9, 11:22 pm, RichardOnRails <RichardDummyMailbox58...-gP6xRNRnnqSxhq/XJNNIW0EOCMrvLtNR@public.gmane.org> wrote:> Hi All, > > Please ignore everything I said. Somehow, I cleaned up my act (so > far) and got a skeleton migration running. > > I''ll probably screw-up something else as I continue this effort, but > I can go to bed happily tonight. > > Best wishes, > Richard > > On Jun 9, 8:28 pm, RichardOnRails > > <RichardDummyMailbox58...-gP6xRNRnnqSxhq/XJNNIW0EOCMrvLtNR@public.gmane.org> wrote: > > Hi All, > > > For days, I''ve been trying to get rake db:migration to work. > > > My first error was pointed out to my on this NG: I was using a dot > > rather than colon in the rake command. > > > My second error led me to conclude that their a problem in the rails > > command. I must be wrong, because there must be thousands or Rails > > on Windows users out there. But I can''t see it. > > > I ran the command: > > > C:\>rails var\www\cookbook --database=mysql > > > The generated C:\var\www\cookbook\config\database.yml has a space > > character following the colons in the non-comment statements. I > > confirmed this by viewing database.yml both with: > > - Notepad > > - XVI32.exe ( Hex editor which showed the char following the ":" were > > 0x20 == ASCII Space) > > > I was led to this fact when I subsequently ran the following command > > and got results in a Command Window: > > > C:\var\www\cookbook>ruby script/generate migration > > K:/_Utilities/ruby186-26_rc2/ruby/lib/ruby/gems/1.8/gems/ > > activerecord-2.0.2/lib/active_record/connection_adapters/abstract/ > > connection_specification.rb > > :217:in `establish_connection'': adapter:mysql encoding:utf8 > > database:cookbook_development username:root password:beer > > host:localhost database is not configured > > (ActiveRecord::AdapterNotSpecified) > > > I''m running: > > - Rails 2.0.2 run over > > - ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] on top of > > - WinXP-Pro/SP2 > > > Thanks in Advance for any observations any of you might have. > > > Best wishes, > > Richard--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---