我在大约两周内没有触及我的代码,一切正常。在尝试运行服务器时,我一直看到内部服务器错误,并显示以下消息:
缺少secret_token
和secret_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文件中。我之前从未见过这个错误,也没有改变任何东西