用script/generate产生问题
用script/generate产生以下问题:
C:/ruby/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 18, col 2: ` host: localhost' (ArgumentError)
from C:/ruby/lib/ruby/1.8/yaml.rb:133:in `load'
from C:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/initializer.rb:523:in `database_configuration'
from C:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/initializer.rb:228:in `initialize_database'
from C:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/initializer.rb:88:in `process'
from C:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/initializer.rb:43:in `send'
from C:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/initializer.rb:43:in `run'
from ./script/../config/../config/environment.rb:13
from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from C:/ruby/lib/ruby/gems/1.8/gems/rails-1.2.3/lib/commands/generate.rb:1
from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from C:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from script/generate:3
请问是什么问题?如何解决? 1 楼 hgq0011 2007-05-24 lz我现在也遇到这个问题不知道为什么?
2 楼 hgq0011 2007-05-24 刚才突然灵感,说明你的配置文件的中语法有问题。
比如那个database.yml中“password:123”在“:”和"123“之间要有一个空格。请检查你的。:)