简体   繁体   中英

rails g migration error

I don't know what to do. Try to use command

$ rails g migration vacancy

but this command give me error:

    invoke  active_record
/home/proger/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in `parse': (<unknown>): mapping values are not allowed in this context at line 21 column 11 (Psych::SyntaxError)
    from /home/proger/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in `parse_stream'
    from /home/proger/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/psych.rb:151:in `parse'
    ...

There are many rows in error code

I don't know how to fix that Thanks

UPDATE

development:
adapter: mysql2
encoding: utf8
reconnect: false
database: jobs
pool: 5
username: root
password: toor
socket: /var/run/mysqld/mysqld.sock

update: with sqlite3 there is no problem. problem in mysql gem

It seems that you have syntax error in yaml file. Probably it is in config/database.yml

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM