当运行在MySQL数据库中生成表的小脚本时,我遇到了以下错误。
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/psych.rb:154:in `parse': (/root/.siriproxy/config.yml):
couldn't parse YAML at line 0 column 0 (Psych::SyntaxError)
from /usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/psych.rb:154:in `parse_stream'
from /usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/psych.rb:125:in `parse'
from /usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/psych.rb:112:in `load'
from /usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/psych.rb:229:in `block in load_file'
from /usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/psych.rb:229:in `open'
from /usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/psych.rb:229:in `load_file'
from /usr/local/rvm/gems/ruby-1.9.3-p125@SiriProxy/gems/siriproxy-0.9.9/lib/siriproxy/command_line.r
b:263:in `parse_options'
from /usr/local/rvm/gems/ruby-1.9.3-p125@SiriProxy/gems/siriproxy-0.9.9/lib/siriproxy/command_line.r
b:38:in `initialize'
from /usr/local/rvm/gems/ruby-1.9.3-p125@SiriProxy/gems/siriproxy-0.9.9/bin/siriproxy:6:in `new'
from /usr/local/rvm/gems/ruby-1.9.3-p125@SiriProxy/gems/siriproxy-0.9.9/bin/siriproxy:6:in `<top (re
quired)>'
from /usr/local/rvm/gems/ruby-1.9.3-p125@SiriProxy/bin/siriproxy:19:in `load'
from /usr/local/rvm/gems/ruby-1.9.3-p125@SiriProxy/bin/siriproxy:19:in `<main>
任何导致错误的想法,我都有配置文件中提供的主机,数据库名称,用户名和密码。
修改:YML文件:http://pastie.org/private/pjyua5fczxokfggkxfdbtq
修改:非评论和空行文件:http://pastie.org/private/n4rwlxhcd4nuon117qt7ag
答案 0 :(得分:3)
我最好的猜测是/root/.siriproxy/config.yml
中的YAML无效。您可以尝试在此处解析和验证它: