用netbeans ruby ide第一个demo就出错:
ruby 代码
- rake aborted!
- syntax error on line 18, col 2: ` host: localhost'
- rake aborted!
- Invalid escape character syntax: /E:\My Documents\NetBeansProjects\depot\Rakefile/
- C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1772:in `standard_exception_handling': Invalid escape character syntax: /E:\My Documents\NetBeansProjects\depot\Rakefile/ (RegexpError)
- from C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1772:in `find'
- from C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1772:in `each'
- from C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1772:in `find'
- from C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1772:in `standard_exception_handling'
- from C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1708:in `run'
- from C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7
- from C:/ruby/bin/rake:16:in `load'
- from C:/ruby/bin/rake:16
google搜索才知道database.xml文件里面数据库Password后面少了一个空格
ruby 代码
- #注意字段冒号和真实的值之间有空格
- evelopment:
- adapter: mysql
- database: depot_development
- username: root
- password: 1q2w
- host: localhost