找不到secret_token和secret_key_base

时间:2016-02-01 17:51:21

标签: ruby-on-rails secret-key

我在大约两周内没有触及我的代码,一切正常。在尝试运行服务器时,我一直看到内部服务器错误,并显示以下消息:

缺少secret_tokensecret_key_base用于开发'环境,在config/secrets.yml

中设置这些值

并在我的服务器日志中:

DEPRECATION WARNING: You didn't set secret_key_base. Read the upgrade documentation to learn more about this new config option. (called from service at /Users/anishasrivastava/.rvm/rubies/ruby-2.2.3/lib/ruby/2.2.0/webrick/httpserver.rb:138)

这是我的secrets.yml文件: development: secret_token: (random sequence generated with rake secret) secret_key_base: (random sequence generated with rake secret) test: secret_token: (random sequence generated with rake secret) secret_key_base: (random sequence generated with rake secret) production: secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>

所以,这些值似乎清楚地出现在secrets.yml文件中。我之前从未见过这个错误,也没有改变任何东西

0 个答案:

没有答案