reply to closed post: error with rails generate script

I

idletask

I also had an error with ruby's script/generate call - exactly the same
error as you had:

/usr/local/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 16,
col 2: ` password:' (ArgumentError)
from /usr/local/lib/ruby/1.8/yaml.rb:133:in `load'
from
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/initializer.rb:459:in
`database_configuration'
from
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/initializer.rb:181:in
`initialize_database'
from
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.0/lib/initializer.rb:84:in
`process'
from
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.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.3.0/lib/active_support/dependencies.rb:136:in
`require'
from
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.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.3.0/lib/active_support/dependencies.rb:136:in
`require'
from script/generate:3

It seems that the database.yml file is very picky.

I had to place a space between the "username" field and the actual
username..

<before/>
development:
adapter: mysql
database: depot_development
username:root
password:
host: localhost

<after/>
development:
adapter: mysql
database: depot_development
username: root #note the space here!
password:
host: localhost

- and then it would work.
 

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

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top