部署 加载 PostgreSQL 数据库结构时报错

dick · 2014年03月07日 · 最后由 dick 回复于 2014年03月09日 · 2166 次阅读
➜  rabel git:(master) ✗ bundle exec rake db:setup RAILS_ENV=production
rake aborted!
(<unknown>): could not find expected ':' while scanning a simple key at line 20 column 3
/home/rabel/.rvm/gems/ruby-2.0.0-p247/gems/railties-3.2.17/lib/rails/application/configuration.rb:115:in `database_configuration'
/home/rabel/.rvm/gems/ruby-2.0.0-p247/gems/activerecord-3.2.17/lib/active_record/railties/databases.rake:25:in `block (2 levels) in <top (required)>'
/home/rabel/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:in `eval'
/home/rabel/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => db:setup => db:schema:load_if_ruby => db:create => db:load_config
(See full trace by running task with --trace)

YAML 文件缩进有问题,注意区分空格和 Tab

#1 楼 @huacnlee 刚刚接触 Ruby,不太了解,麻烦您给一个修改方法,好吗?

#3 楼 @huacnlee 请问 database.yml 这个文件在哪里?

需要 登录 后方可回复, 如果你还没有账号请 注册新账号