Answer the question
In order to leave comments, you need to log in
Why doesn't devise authorize the admin in production?
Hello Toaster!
There is a blog with connected devis for the admin, like this:
class Admin < ApplicationRecord
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable and :omniauthable
devise :database_authenticatable
end
namespace :deploy do
desc "TODO"
task init_admin: :environment do
Admin.create(email: "[email protected]", password: "password")
end
end
92.50.231.169 - - [11/Oct/2017:16:43:46 +0300] "POST /admins/sign_in HTTP/1.0" 200 - 0.1391
92.50.231.169 - - [11/Oct/2017:16:43:52 +0300] "POST /admins/sign_in HTTP/1.0" 200 - 0.1575
92.50.231.169 - - [11/Oct/2017:16:46:39 +0300] "GET /admins/sign_in HTTP/1.0" 200 - 0.0067
92.50.231.169 - - [11/Oct/2017:16:47:09 +0300] "POST /admins/sign_in HTTP/1.0" 200 - 0.1442
92.50.231.169 - - [11/Oct/2017:16:50:19 +0300] "GET / HTTP/1.0" 200 - 0.0086
92.50.231.169 - - [11/Oct/2017:16:51:04 +0300] "POST /admins/sign_in HTTP/1.0" 200 - 0.1475
43.241.229.205 - - [11/Oct/2017:16:51:17 +0300] "GET / HTTP/1.0" 200 - 0.0070
92.50.231.169 - - [11/Oct/2017:16:59:52 +0300] "POST /admins/sign_in HTTP/1.0" 200 - 0.1598
92.50.231.169 - - [11/Oct/2017:17:00:07 +0300] "GET /unauthenticated HTTP/1.0" 302 - 0.0099
92.50.231.169 - - [11/Oct/2017:17:00:08 +0300] "GET /admins/sign_in HTTP/1.0" 200 - 0.0100
92.50.231.169 - - [11/Oct/2017:17:00:17 +0300] "POST /admins/sign_in HTTP/1.0" 200 - 0.1422
Answer the question
In order to leave comments, you need to log in
Is there a block for error output on the page?
The problem may simply be that the admin `[email protected]` has already been created with a different password. When you log in, you try to log in with the wrong password (according to the database version).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question