NOAUTH身份验证需要redis

时间:2015-10-20 19:05:53

标签: ruby-on-rails-4 redis redis-cache redis-server

启动 redis-server

  

redis-server /usr/local/etc/redis.conf

Redis配置文件( /usr/local/etc/redis.conf ):

div {
    overflow:hidden;
}
div p {
    background-color:green;
    margin:20px 0;
}

Rails - application.yml

... 
requirepass 'foobared'
...

错误

...
development:
  redis_password: 'foobared
...

应用/模型/ user.rb:54

Redis::CommandError - NOAUTH Authentication required.:
...
app/models/user.rb:54:in `last_accessed_at' 
...

session_key 只是用户模型的一个属性。

顺便说一句:

Line 53 - def last_accessed_at
Line 54 -  Rails.cache.read(session_key)
Line 55 - end

0 个答案:

没有答案
相关问题