Hello, I am using Komodo Edit 5.0 for ROR. I have made the database by using the macros in it. But when I make model using sacffold, I get error. The details are given below: C:/Ruby/lib/ruby/1.8/yaml.rb:133:in `load'': syntax error on line 22, col 2: ` password:'' (ArgumentError) from C:/Ruby/lib/ruby/1.8/yaml.rb:133:in `load'' from C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:819:in `database_configuration'' from C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:391:in `initialize_database'' from C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:139:in `process'' from C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in `send'' from C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/initializer.rb:112:in `run'' from E:/ror/MovieApp/config/environment.rb:13 from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'' from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'' from C:/Ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/generate.rb:1 from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'' from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'' from script/generate:3 ------------------------------------------------ My database.yml is given below # MySQL. Versions 4.1 and 5.0 are recommended. # # Install the MySQL driver: # gem install mysql # On Mac OS X: # sudo gem install mysql -- --with-mysql-dir=/usr/local/mysql # On Mac OS X Leopard: # sudo env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config # This sets the ARCHFLAGS environment variable to your native architecture # On Windows: # gem install mysql # Choose the win32 build. # Install MySQL and put its /bin directory on your path. # # And be sure to use new-style password hashing: # http://dev.mysql.com/doc/refman/5.0/en/old-client.html development: adapter: mysql encoding: utf8 database: MovieApp_development pool: 5 username:root password: host: localhost # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". # Do not set this db to the same as development or production. test: adapter: mysql encoding: utf8 database: MovieApp_test pool: 5 username: root password: host: localhost production: adapter: mysql encoding: utf8 database: MovieApp_production pool: 5 username: root password: host: localhost ---------------------------------------------------- Please help me in tis regard. -- 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 -~----------~----~----~----~------~----~------~--~---
On 10 Feb 2009, at 17:04, Adeel Shahzad wrote:> > development: > adapter: mysql > encoding: utf8 > database: MovieApp_development > pool: 5 > username:rootthe space (or rather lack of space) between username and root is significant Fred>--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Frederick Cheung wrote:> On 10 Feb 2009, at 17:04, Adeel Shahzad wrote: >> >> development: >> adapter: mysql >> encoding: utf8 >> database: MovieApp_development >> pool: 5 >> username:root > > the space (or rather lack of space) between username and root is > significant > > FredThanx Fred. But the thing is that database is created in DB using the same database.yml and the same database.yml is not working for scaffold. I have seen, there is no issue with spaces. -- 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 -~----------~----~----~----~------~----~------~--~---
On 10 Feb 2009, at 17:30, Adeel Shahzad wrote:> > Frederick Cheung wrote: >> On 10 Feb 2009, at 17:04, Adeel Shahzad wrote: >>> >>> development: >>> adapter: mysql >>> encoding: utf8 >>> database: MovieApp_development >>> pool: 5 >>> username:root >> >> the space (or rather lack of space) between username and root is >> significant >> >> Fred > > Thanx Fred. But the thing is that database is created in DB using the > same database.yml and the same database.yml is not working for > scaffold. > > I have seen, there is no issue with spaces.I suggest you try again - I can replicate the exact error you get with my apps by removing the space after the : Those spaces are important in yaml, as is indentation Fred> > -- > 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 -~----------~----~----~----~------~----~------~--~---