Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/59.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/335.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 如何在VPS中使用密钥库进行部署_Ruby On Rails_Ruby_Deployment_Digital Ocean_Vps - Fatal编程技术网

Ruby on rails 如何在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=

我试图在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=
但我也犯了同样的错误

secrets.production.yml:

production:
  secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
生产:
机密密钥库:

如果您使用的是Rails>=5.2,则应运行以下命令:

rails credentials:edit

该命令将创建
config/master.key
config/credentials.yml.enc
文件。

您是否在此处尝试了此解决方案:或此: