简体   繁体   English

刷出gem添加http_basic_authenticate_with发生错误

[英]Wash out gem add http_basic_authenticate_with occur an error

this is my error stack : 这是我的错误堆栈:

> 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'

and here is my code: 这是我的代码:

 http_basic_authenticate_with username: "xxx01", password: "123456"

when i comment the code ,it works, i don't know why this error occured,how to fix it 当我评论代码,它的工作原理,我不知道为什么会出现这个错误,如何解决它

it works when i first enter the page, but when i input the username and password the error occurred. 它在我第一次进入页面时有效,但是当我输入用户名和密码时,发生了错误。

我现在知道了,http_basic_auth只接受:name&:passowrd

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM