title: NOAUTH Authentication required redis
body: <p>Start <strong>redis-server</strong>:</p>
  
  <blockquote>
    <p>redis-server /usr/local/etc/redis.conf</p>
  </blockquote>
  
  <p>Redis config file (<strong>/usr/local/etc/redis.conf</strong>):</p>
  
  <pre><code>... 
  requirepass 'foobared'
  ...
  </code></pre>
  
  <p>Rails - <strong>application.yml</strong>:</p>
  
  <pre><code>...
  development:
    redis_password: 'foobared
  ...
  </code></pre>
  
  <p><strong>The Error</strong>:</p>
  
  <pre><code>Redis::CommandError - NOAUTH Authentication required.:
  ...
  app/models/user.rb:54:in `last_accessed_at' 
  ...
  </code></pre>
  
  <p><strong>app/models/user.rb:54</strong>:</p>
  
  <pre><code>Line 53 - def last_accessed_at
  Line 54 -  Rails.cache.read(session_key)
  Line 55 - end
  </code></pre>
  
  <p>and <strong>session_key</strong> is just an attribute of <strong>User</strong> model.</p>
  
  <p>BTW:</p>
  
  <pre><code>± 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
  </code></pre>