scaffoldジェネレーター実行でエラー
# scaffoldジェネレーター実行
$ rails g scaffold item name:string price:integer description:text
invoke active_record
/home/vagrant/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/psych.rb:203:in `parse': (<unknown>): could not find expected ':' while scanning a simple key at line 18 column 3 (Psych::SyntaxError)
原因
database.ymlの定義内で、コロン(:)の後ろにスペースがなかったのが原因。usernameやpasswordなどユーザーが各自変更した部分が疑わしい。
database.yml
development:
adapter: mysql2
encoding: utf8
reconnect: false
database: sample_development
pool: 5
username: railsuser
password: railspass
host: localhost