Ruby on rails 如何在VPS中使用密钥库进行部署
我试图在VPS上部署我的应用程序,但出现错误:Ruby on rails 如何在VPS中使用密钥库进行部署,ruby-on-rails,ruby,deployment,digital-ocean,vps,Ruby On Rails,Ruby,Deployment,Digital Ocean,Vps,我试图在VPS上部署我的应用程序,但出现错误: ArgumentError: Missing `secret_key_base` for 'production' environment, set this string with `rails credentials:edit` 我将我的secret\u key\u base添加到环境变量中: export SECRET_KEY_BASE=<my secret key> export SECRET\u KEY\u BASE=
ArgumentError: Missing `secret_key_base` for 'production' environment, set this string with `rails credentials:edit`
我将我的secret\u key\u base
添加到环境变量中:
export SECRET_KEY_BASE=<my secret key>
export SECRET\u KEY\u BASE=
但我也犯了同样的错误
secrets.production.yml:
production:
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
生产:
机密密钥库:
如果您使用的是Rails>=5.2,则应运行以下命令:
rails credentials:edit
该命令将创建
config/master.key
和config/credentials.yml.enc
文件。您是否在此处尝试了此解决方案:或此: