error with rails generate script

U

Uung Bhuwono

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
 
L

Lutz Horn

Hi,

Uung said:
"/usr/local/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line
33, col 8: ` #host: localhost' (ArgumentError)

Look into your database configuration file, line 33, and fix this
error.

Lutz
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,127
Latest member
CyberDefense
Top