0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

bundle installでPlease add the following to your Devise initializer: (RuntimeError)と表示されたとき

0
Posted at

Deviseを使用しているプロジェクトをcloneしてbundle installを実行した時、以下のようなエラーが表示された。

Devise.secret_key was not set. Please add the following to your Devise initializer: (RuntimeError)

元々のプロジェクト自体作成したばかりで、イニシャライザーなんて特にいじった記憶ないんだけどな...うーん。
と思ってたら、末尾に以下のような文が。

Please ensure you restarted your application after installing Devise or setting the key.

Deviseをインストール、もしくはキーを設定した後にアプリ再起動しろと。
キー設定っていうのがよくわからんけど、とりあえずrailsサーバを落としてから再度rails sを実行すると通った。

調べてみるとDeviseの設定はアプリ再起動しないと読み込みが行われないらしく、おそらくそのあたりが原因かもしれない。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?