LoginSignup
2

More than 5 years have passed since last update.

ローカルなのにWe're sorry, but something went wrong.と言われる

Posted at

railsをローカルで実行した時,特に環境を指定してなくてもdevelopment環境で実行されるはずです.We're sorry, but something went wrong.と怒られるはずがないので原因がわかりませんでした.

とりあえずlog/development.logを覗くと

ActionView::Template::Error: :ja is not a valid locale

...はい

原因

railsで用意してないlocaleをconfig/application.rbに設定していた


config.i18n.default_locale = :ja

解決策

config/locales以下にja.ymlを置く

感想

画面にActionView::Template::Error: :ja is not a valid localeって出してくれたら嬉しい...(localeなくても英語で出してほしい)

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
2