由于Psych :: SyntaxError,无法迁移数据库

时间:2016-02-02 04:47:44

标签: ruby-on-rails yaml database-migration

我有一个非常奇怪的问题。我正在尝试将我的应用部署到vps。为它创建数据库后,当我尝试迁移我的数据库时,我收到此错误:

YAML syntax error occurred while parsing /root/projects/bbla/config/database.yml. Please note that YAML must be consistently indented using spaces. Tabs are not allowed. Error: (<unknown>): found a tab character that violate intendation while scanning a plain scalar at line 15 column 13
/root/projects/bbla/config/environment.rb:5:in `<top (required)>'
Psych::SyntaxError: (<unknown>): found a tab character that violate intendation while scanning a plain scalar at line 15 column 13
/root/projects/bbla/config/environment.rb:5:in `<top (required)>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)

这是我的database.yml:

development:
  adapter: sqlite3
  database: db/development.sqlite3

test:
  adapter: sqlite3
  database: db/test.sqlite3
  pool: 5
  timeout: 5000

production:
  adapter: postgresql
  database: bbla
  host: localhost
  password: secret

我已经花了几个小时试图搞清楚,但仍然没有运气!也许有人可以看到问题。

我已经在在线yml验证器中检查了我的代码,它说没关系。

非常感谢提前!

更新由Arup Rakshit解决!这是一个奇怪的故障(可能是坏的隐形字符)。帮助删除database.yml并再次创建它,没有复制/过去。

0 个答案:

没有答案