我正在尝试在 AWS Beanstalk 上上传我的 rails 项目。
我已经运行了 eb init、eb start 并将数据库设置配置为指向 RDS。在我使用 git aws.push 推送并等待 AWS 服务器启动后,提供的链接显示:
"502 Bad Gateway nginx"
在日志中
-------------------------------------
/var/app/support/logs/passenger.log
-------------------------------------
App 6861 stderr: [ 2014-05-29 13:26:59.1308 6893/0x00000001e50050(Worker 1) utils.rb:68 ]:
*** Exception RuntimeError in Rack application object (Missing `secret_key_base` for
'production' environment, set this value in `config/secrets.yml`) (process 6893, thread
0x00000001e50050(Worker 1)):
在我的秘密.yml
# Do not keep production secrets in the repository,
# instead read values from the environment.
production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>