2

Start redis-server:

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

Redis config file (/usr/local/etc/redis.conf):

... 
requirepass 'foobared'
...

Rails - application.yml:

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

The Error:

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

app/models/user.rb:54:

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

and session_key is just an attribute of User model.

BTW:

± ps -ef | grep redis
  501 62491 57789   0  1:45PM ttys001    0:00.37 redis-server 127.0.0.1:6379
  501 62572 59388   0  1:54PM ttys002    0:00.00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn redis
Emba Moussa
  • 662
  • 8
  • 18
  • 1
    did you forget show us where you set password something like this ```Redis.new(:password => "mysecret")``` or did you set this password somewhere in rails app? – quatermain Dec 21 '15 at 15:50

1 Answers1

0

I got the same error:

I just commented out the requirepass line.

# requirepass 'foobared'

It worked in my case.

  • 1
    This does not provide an answer to the question. Once you have sufficient [reputation](https://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](https://stackoverflow.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/30195296) – TheRealHypo Oct 28 '21 at 03:14