执行rspec spec/requests/authentication_pages_spec.rb -e "signin with invalid information"
提示:
·DEPRECATION WARNING: You didn't set config.secret_key_base. Read the upgrade documentation to learn more about this new config option. (called from get at /home/johnlu/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/forwardable.rb:171)
在网上找到的解决办法:
https://github.com/rails-api/rails-api/issues/72
在config/application.rb
中加入config.secret_key_base = 'blipblapblup'
在http://edgeguides.rubyonrails.org/configuring.html有说明,但不懂是什么意思!
config.secret_key_base used for specifying a key which allows sessions for the application to be verified against a known secure key to prevent tampering. Applications get config.secret_key_base initialized to a random key in config/initializers/secret_token.rb.
问题是解决了,但迷茫的是为什么要这样设置?