English 中文(简体)
无法解析 YAML 在第 21 栏 0 栏
原标题:couldn t parse YAML at line 21 column 0

我试图让 Pg 宝石在一个应用程序中工作。 我在我的系统MAC OSx Lion上成功安装了 pgres posgresql, I m 假设 / config/ database.yml 是相关文件, 因为我一直在黑它来获取 db 连接集, 这在以前没有用过, 但现在现在却在用, 所以我假设数据库.yml 文件有问题。 在一旁的注释上,我知道 posgresql 正在工作, 因为我可以创建 s, 但我不能进入 铁路 db 控制台, 与下面的错误相同。

  development:
  adapter: postgresql
  encoding: unicode
  database: dbc2_development
  pool: 5
  username: dbc2
  password: password
  host: localhost
  port: 5432

  test:
  adapter: postgresql
  encoding: unicode
  database: dbc2_test
  pool: 5
  username: dbc2
  password: password
  host: localhost
  port: 5432

当我尝试运行 rake db: create: 所有我得到的打击错误问题

rake aborted! (<unknown>): couldn t parse YAML at line 21 column 0

我还要补充哪些其他细节,使这一问题具有相关性?

谢谢 谢谢

问题回答

尝试在变量前插入适当的 tabbbing 。





相关问题
Should I use YAML or JSON to store my Perl data? [closed]

I ve been using the YAML format with reasonable success in the last 6 months or so. However, the pure Perl implementation of the YAML parser is fairly fidgety to hand-write a readable file for and ...

How do you put HTML or XML into a YAML?

I would like to store HTML snippets inside a YAML file. What is the best way to do that? Something like: myhtml: | <div> <a href="#">whatever</a> </div>

What is the difference between YAML and JSON?

What are the differences between YAML and JSON, specifically considering the following things? Performance (encode/decode time) Memory consumption Expression clarity Library availability, ease of use ...

热门标签