ruby-on-rails – Rails rake db:schema:dump error

前端之家收集整理的这篇文章主要介绍了ruby-on-rails – Rails rake db:schema:dump error前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
当我运行rake db:schema:dump时

我收到以下错误

rake aborted!
(): could not find expected ‘:’ while scanning a simple key at line 18
column 3

Tasks: TOP => db:schema:dump => db:load_config

(See full trace by running task with –trace)

我怎样才能解决这个问题?

解决方法

我发现“:”分隔符后面必须跟一个空格值.例如,这使得rake db:create命令崩溃:

database.yml文件中:

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.一个被忽视的空间使得差异.希望这可以帮助

猜你在找的Ruby相关文章