LoginSignup
8
1

More than 5 years have passed since last update.

Rails5.2でCircleCIビルドエラー。Devise.secret_key was not set. Please add the following to your Devise initializer

Posted at

Rails5.1からsecret_keyRails.application.credentials.secret_key_baseで設定するようになったが、CircleCIにはmaster.keyが渡されないのでこのエラーが発生する。

CircleCIの Build Settings > Environment Variables で環境変数を設定できる。
RAILS_MASTER_KEYmaster.keyの内容を設定してあげれば動く。

参考
Handle Credentials in CircleCI - Rails App - Stack Overflow

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