gpt4 book ai didi

amazon-web-services - Rails 4.1 AWS Beanstalk 找不到 keystore

转载 作者:行者123 更新时间:2023-12-01 07:44:56 26 4
gpt4 key购买 nike

我正在尝试在 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)):

在我的 secret .yml
# Do not keep production secrets in the repository,
# instead read values from the environment.
production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>

最佳答案

我做了以下操作并解决了问题,但感觉有点强制,就像我在某处错过了一步。

  • 转到弹性 beanstalk -> 应用程序 -> 配置 -> 软件配置
  • 点击齿轮按钮
  • 输入一个新的环境变量
    SECRET_KEY_BASE   xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  • 保存并等待 AWS 服务器重启
  • 关于amazon-web-services - Rails 4.1 AWS Beanstalk 找不到 keystore ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23935113/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com