LoginSignup
5
3

More than 3 years have passed since last update.

Psych::SyntaxErrorの対処法

Posted at

エラーの内容

s3に画像をアップさせる関係で、secrets.ymlを書き換えたら、rails sで以下のエラーが出た。

`parse': (<unknown>): did not find expected key while parsing a block mapping at line 13 column 1 (Psych::SyntaxError)

解決した方法

上記のエラーについて調べたところ、検索で上位表示される記事のほとんどで、ymlファイルのインデントがずれていることによるエラーが出ると書いてあった。

そこで、筆者はVScodeを利用していることから、(command)+Pを用いて、.ymlのつくファイルを検索しインデントのずれを探した。

まあ、.ymlファイルをいじったことは記憶に新しかった(s3関連でいじってる)ので、secrets.ymlをまず確認したところ、development、test、productionが全てずれていた。

これを戻し、rails sをし直すと、、、

できた!!!!!

5
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
3