Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails rake db:schema:dump error

When I run rake db:schema:dump

I get the following error:

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)

How can I fix this?

like image 328
Equate Avatar asked May 09 '12 08:05

Equate


1 Answers

I found that the ":" separators must be followed by a space before the value. For instance, this makes the rake db:create command crash:

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

By simply inserting a space between the colon separating password and anythingapple, like this: password: anythingapple the Rake db:create ran fine. One neglected space makes the diff. Hope this helps

like image 136
lonsrb Avatar answered Nov 09 '22 16:11

lonsrb