ruby on rails-只在开发环境中需要修改config.securt_key



当config.secret_key没有在devise.rb中设置,但它在没有设置的开发环境中工作时,我在我们的NEW staging上收到了这个错误,是吗?所以只有开发不需要config.securt_key?

出于某种原因,在没有配置secret_key的情况下,我们的旧暂存也很好,知道吗?

 Devise.secret_key was not set. Please add the following to your Devise initializer:
 config.secret_key = '22b6bad239151c217c9c10d34328e4350d7c90ed8b4a3fcf593835c2f54bf4f7b6044df52e262f667e673eddb1ccd73e606b345acdf0f1d5f0abf62863ed5f18'
 Please ensure you restarted your application after installing Devise or setting the key.

如消息所示:

请将以下内容添加到您的Devise初始值设定项中:

config.secret_key='--secret key-'

设计密钥

Devise使用密钥进行安全保护。在开发模式下,它不需要密钥,但在生产模式下。您必须在config/iinitializer/devise.rb 中设置一个密钥

最新更新