当我运行rake db:schema:dump时
我收到以下错误:
rake aborted!
(): could not find expected ‘:’ while scanning a simple key at line 18
column 3Tasks: TOP => db:schema:dump => db:load_config
(See full trace by running task with –trace)
我怎样才能解决这个问题?
解决方法
我发现“:”分隔符后面必须跟一个空格值.例如,这使得rake db:create命令崩溃:
development: adapter: MysqL2 encoding: utf8 reconnect: true database: Some_Silly_Database_development pool: 5 username: Jobs password:anythingapple socket: /tmp/MysqL.sock
只需在冒号分隔密码和anythingapple之间插入一个空格,如下所示:password:anythingappleRake db:create run fine.一个被忽视的空间使得差异.希望这可以帮助