0
0

More than 3 years have passed since last update.

uninitialized constant ~~ の対処法

Last updated at Posted at 2021-08-25

背景

Railsにて ログイン機能を実装できるGem devise を実装しようとしていた中の出来事です。
ログイン画面はできたのですが、ログアウトを選択すると以下のエラーが発生しました。

Routing Error
uninitialized constant Users

直訳すると「初期化されていない定数」とのことです。

原因

users コントローラがないことが原因でした。
初歩的なミスですね。作り忘れていたみたいです。。

解決策

usersコントローラーで作成したら解決です。
ログアウトを選択してもエラーは出なくなりました。

0
0
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
0
0