To content | To menu | To search

Saturday, December 5 2020

Redmine+Phusion Passenger+Apache で Missing `secret_key_base` for 'production' environment

Redmine が webrick で動作するのを確認した後、Phusion Passenger と Apache を入れて動かそうとしたら

Missing `secret_key_base` for 'production' environment

のエラーが出た話。

OS は FreeBSD 12.1-RELEASE-p10、Ruby は 2.6.6p146 、gems は 3.0.6、Redmine は 4.1.1、Apache は 2.4.46。

とりあえず、config/environments/test.rb には

config.secret_key_base = 'a secret token for running the tests'

という行があるのに config/environments/production.rb には無かったので、適当な文字列で追加したら、ひとまず Redmine 起動した。