Help us understand the problem. What is going on with this article?

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

More than 3 years have passed since last update.

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なくても英語で出してほしい)

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away