Mina和Devise.secret_key未设置 [英] Mina and Devise.secret_key was not set

查看:240
本文介绍了Mina和Devise.secret_key未设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用mina部署我的应用程序。
当它开始运行迁移时,我收到这个错误:

  ----->迁移数据库
rake aborted!
Devise.secret_key未设置。请将以下内容添加到您的Devise初始化程序中:

config.secret_key ='key here .......'

请确保您在安装Devise或设定关键
.........

在我的设计初始化程序中,我有code> config.secret_key = ENV [SECRET_KEY_BASE]



如何将此密钥添加到我的应用程序?
secret_key_base和secret_key是否不同?



这可能是愚蠢的,但我不知道如何添加这个密钥。



本地一切工作正常



ps我使用figaro

解决方案

我添加了

  set:shared_pa​​ths,['config / database.yml','log','config / secretts.yml'] 

到我的 deploy.rb 它解决了我的问题。



secrets.yml 我设置 DEVISE_SECRET


I'm trying to deploy my app with mina. When it starts to run migrations I got this error:

-----> Migrating database
rake aborted!
Devise.secret_key was not set. Please add the following to your Devise initializer:

  config.secret_key = 'key here.......'

Please ensure you restarted your application after installing Devise or setting the key.
.........

In my devise initializer I have config.secret_key = ENV["SECRET_KEY_BASE"]

How to add this key to my app? Are secret_key_base and secret_key different?

This might be stupid but I dont know how to add this key.

Locally everything works fine

ps I'm using figaro

解决方案

I added

set :shared_paths, ['config/database.yml', 'log', 'config/secrets.yml']

to my deploy.rb and it solved my problem.

In the secrets.yml I set DEVISE_SECRET

这篇关于Mina和Devise.secret_key未设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆