Ruby on rails 清除gem add http\u basic\u authenticate\u出现错误

Ruby on rails 清除gem add http\u basic\u authenticate\u出现错误,ruby-on-rails,wash-out,Ruby On Rails,Wash Out,这是我的错误堆栈: > TypeError (no implicit conversion of nil into String): > > activesupport (5.0.0.1) lib/active_support/security_utils.rb:23:in `digest' lib/action_controller/metal/http_authentication.rb:71:in `block in > http_bas

这是我的错误堆栈:

> TypeError (no implicit conversion of nil into String):
>     
>     activesupport (5.0.0.1) lib/active_support/security_utils.rb:23:in `digest'
 lib/action_controller/metal/http_authentication.rb:71:in `block in
    > http_basic_authenticate_with'
这是我的代码:

 http_basic_authenticate_with username: "xxx01", password: "123456"
当我注释代码时,它工作了,我不知道为什么会发生这个错误,如何修复它


它在我第一次进入页面时起作用,但当我输入用户名和密码时出现了错误。

我现在知道了,http_basic_auth only accept:name&:passowrd

我现在知道了,http_basic_auth only accept:name&:passowrd