Rails rake db: schema: dump error

When I ran rake db:schema:dump

I get the following error:

rake is interrupted! (): could not find the expected ':' when scanning a simple key in row 18 column 3

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

(See complete trace by completing the task with --trace)

How can i fix this?

+6
source share
2 answers

I found that there should be a space before the value behind the ":" delimiters. For example, this causes the rake db:create command to fail:

In the database.yml file:

 development: adapter: mysql2 encoding: utf8 reconnect: true database: Some_Silly_Database_development pool: 5 username: Jobs password:anythingapple socket: /tmp/mysql.sock 

Just inserting a space between the colon separating the password and nothing, for example: password: anythingapple Rake db: create works fine. One forgotten space makes diff. Hope this helps

+11
source

Check the database.yml file. It looks like you have no line:

+3
source

Source: https://habr.com/ru/post/915266/


All Articles