P
P
Pavel Grudinkin2016-03-07 02:26:25
Ruby on Rails
Pavel Grudinkin, 2016-03-07 02:26:25

There is no authorization in activeadmin. How to understand what is the problem?

I'm trying to get involved in one project and an incomprehensible situation arose, I can't log into the activeadmin panel on my local server, despite the fact that a week ago everything was fine. My colleague has no problems, I tried to install ruby, rails with gems on a new clean system (mint, mac os in a virtual machine), played with versions - to no avail.
I'm waiting for help in the algorithm, how to find what the problem is.
Gems used: activeadmin (1.0.0.pre1), devise, cancan
Server log:

=> Booting WEBrick
=> Rails 4.2.0 application starting in development on  http://localhost:3000
=> Run `rails server -h` for more startup options
=> Ctrl-C to shutdown server
[2016-03-07 13:07:37] INFO  WEBrick 1.3.1
[2016-03-07 13:07:37] INFO  ruby 2.3.0 (2015-12-25) [x86_64-darwin15]
[2016-03-07 13:07:37] INFO  WEBrick::HTTPServer#start: pid=574 port=3000


Started GET "/admin/login" for 127.0.0.1 at 2016-03-07 13:07:39 +0300
 ActiveRecord::SchemaMigration Load (53.1ms)  SELECT   "schema_migrations".* FROM "schema_migrations"
Processing by ActiveAdmin::Devise::SessionsController#new as HTML
Parameters: {"subdomain"=>"cp"}
Rendered /Users/admin/.rvm/gems/[email protected]/bundler/gems/activeadmin-7c18de4cbcf5/app/views/active_admin/devise/shared/_links.erb (18.0ms)
Rendered /Users/admin/.rvm/gems/[email protected]/bundler/gems/activeadmin-7c18de4cbcf5/app/views/active_admin/devise/sessions/new.html.erb within layouts/active_admin_logged_out (149.4ms)
Completed 200 OK in 944ms (Views: 784.9ms | ActiveRecord: 73.6ms)


Started GET "/assets/active_admin/print-dc80313545ee56b4f0861d100d53df16e909c58545c2ae17db7a965cb22d62f0.css" for 127.0.0.1 at 2016-03-07 13:07:41 +0300


Started GET "/assets/active_admin-58d7bbc13e24a649c19c695f83c6ff4c31560bea2b32245b2e04d4d41cdf092d.css" for 127.0.0.1 at 2016-03-07 13:07:41 +0300


Started GET "/assets/active_admin-01877a5096ea1fdc96a6ab5849f381bd5e0e7af0b4eb2271c8a865efdb73a112.js" for 127.0.0.1 at 2016-03-07 13:07:41 +0300


Started POST "/admin/login" for 127.0.0.1 at 2016-03-07 13:07:52 +0300
Processing by ActiveAdmin::Devise::SessionsController#create as HTML
 Parameters: {"utf8"=>"✓", "authenticity_token"=>"dSGy7bQT1CW8U5wnEXF5VEufVkwWsLrh3dYYtuPnI0gdattt3Vg7IFKKFkyd/fhqqdCL0HNHBqYs0p0gM3rQGA==", "user"=>{"email"=>"[email protected]", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Войти", "subdomain"=>"cp"}
User Load (45.0ms)  SELECT  "users".* FROM "users" WHERE "users"."email" = $1  ORDER BY "users"."id" ASC LIMIT 1  
 (0.4ms)  BEGIN
SQL (15.7ms)  UPDATE "users" SET "last_sign_in_at" = $1, "current_sign_in_at" = $2, "sign_in_count" = $3, "updated_at" = $4 WHERE "users"."id" = $5  
(0.9ms)  COMMIT
Redirected to http://cp.test.ru:3000/admin
Completed 302 Found in 343ms (ActiveRecord: 62.4ms)

Started GET "/admin" for 127.0.0.1 at 2016-03-07 13:07:53 +0300
Processing by Admin::DashboardController#index as HTML
 Parameters: {"subdomain"=>"cp"}
Completed 401 Unauthorized in 3ms


Started GET "/admin/login" for 127.0.0.1 at 2016-03-07 13:07:53 +0300
Processing by ActiveAdmin::Devise::SessionsController#new as HTML
 Parameters: {"subdomain"=>"cp"}
Rendered /Users/admin/.rvm/gems/[email protected]/bundler/gems/activeadmin-7c18de4cbcf5/app/views/active_admin/devise/shared/_links.erb (10.3ms)
Rendered /Users/admin/.rvm/gems/[email protected]/bundler/gems/activeadmin-7c18de4cbcf5/app/views/active_admin/devise/sessions/new.html.erb within layouts/active_admin_logged_out (81.5ms)
Completed 200 OK in 192ms (Views: 189.1ms | ActiveRecord: 0.0ms)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
caution, 2016-03-09
@caution

Completed 401 Unauthorized in 3ms
cancan ?
authorization passes for you, but a callback is triggered on /admin

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question