Always getting 401 Unauthorized with new install of Rails + Devise

Well this little exercise in frustration turned out to be a good lesson in RTFM. I had set up Devise with confirmable, and when I created my layouts I neglected to insert the following lines:

<p class="notice"><%= notice %></p>
<p class="alert"><%= alert %></p>

… as it clearly states to do in the getting started guide. When I inserted these I got the error message “You need to confirm your email address before logging in.”

In the console I set confirmed_at = Time.now for the User, and voilĂ , I can now log in.

Leave a Comment