1
6

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.

Rails で Missing 'secret_key_base' 真っ白な画面

Posted at

Ruby on Rails で開発中のプロジェクトに中途から参加.

【環境】

  • Ruby 2.3.1
  • Rails 5.0.1

.ova ファイルをもらい VirtualBox にインポートして rails を起動すると,
192.168.56.102:3000 にて,エラーメッセージ

Puma caught this error: Missing 'secret_key_base' for > 'development' environment, set this value in 'config/secrets.yml' (RuntimeError)

と共に以下の真っ白な画面が出た.

20170209_RoR_SecretKeyError.png

config/secrets.yml
が存在していなかったので作成する.
中身は他のプロジェクトからコピペした.

config/secrets.yml
development:
 secret_key_base:  8***7

test:
 secret_key_base:  3***e

production:
 secret_key_base:  <%= ENV["SECRET_KEY_BASE"] %>

これで無事に起動した.

20170209_RoR_SecretKeyErrorSolved.png

ちなみに Puma は,Production 環境で nginx と併せ使うためレポジトリに含まれているが,ローカル開発環境では未使用.

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?