Error with database.yml when running rails generate script

Hi All,

I’m learn about ruby and rails in the same time.
I got error when running rails generate script when trying to create
application with db
When I execute “ruby script/generate scaffold Product Admin”
It give me error like this
“/usr/local/lib/ruby/1.8/yaml.rb:133:in load': syntax error on line 33, col 8: #host: localhost’ (ArgumentError)
from /usr/local/lib/ruby/1.8/yaml.rb:133:in load' from /usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/initializer.rb:424:in database_configuration’
from
/usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/initializer.rb:168:in
initialize_database' from /usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/initializer.rb:83:in process’
from
/usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/initializer.rb:42:in
run' from ./script/../config/../config/environment.rb:10 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in require’
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:214:in
require' from /usr/local/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/commands/generate.rb:1 from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in require’
from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:214:in
`require’
from script/generate:3”

How can I fix this,
Thanks before


Uung H.R Bhuwono

+++++++++++++++++++++++++++++++++++++++++++++
Personal Blog