LoginSignup
0
0

More than 5 years have passed since last update.

EncryptedSecretsがdevelopment環境で使えない時

Posted at

config/secrets.yml.encを更新してもAPIキーがnilのまま

console
$ rails c

Loading development environment(Rails 5.1.ホニャララ)
>> Rails.application.secrets
=>{:secret_key_base=>nil :secret_token=>nil}

実はconfig/environments/development.rbで「encrypted secretsを使うよ」って設定してやる必要があったらしい

config/environments/development.rb
Rails.application.configure do
  (いろいろな設定)
  ...
  config.read_encrypted_secrets = true ←これ
end

参考にさせて頂いた記事

rails 5.1のEncrypted secretsを試す -Qiita

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