用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
NetBeans Ruby IDE 错误解决
本文介绍了一个使用NetBeans作为Ruby IDE时遇到的错误,并详细解释了如何通过检查配置文件中的语法来解决问题,特别是关于数据库配置文件database.xml中密码字段的正确格式。
8462

被折叠的 条评论
为什么被折叠?



