Can’t log into Active Admin after pushing to Heroku


I was trying to push a Rails app including active_admin to Heroku.

I expect to be able to log into Active Admin after pushing to Heroku

I have built a Rails app using active_admin. First I tried it on my localhost. I logged in with, set a new admin, and deleted the user. Then I pushed my app to GitHub and further to Heroku. I noticed Active Admin was not reachable on Heroku so I checked the logs and ran heroku rake db:migrate. Now I can switch to the login site at /admin but I cannot login. Neither with the nor my newly-created admin.

How can I fix this?


Fixed it with bypassing the authentication in the active_admin.rb
– minennick
Why would you bypass authentication? How can that possibly be considered a solution?
@Chris i set config.current_user_method and config.authentication_method in the active_admin.rb to false. deployed it to heroku. Went in the admin interface and created a new admin. set the methods in the .rb back and deployed it again
– minennick
18 hours ago



When you deploy to Heroku your code gets updated on your dynos. Your database doesn’t. Migrations must be run, e.g. via heroku run rake db:migrate or a release phase command, and any data you want must be created.

Whatever users you’ve configured on your development machine won’t exist on Heroku. This is a good thing.

You should be able to add the default admin user by running heroku run rake db:seed using the Heroku CLI tool. Alternatively, you could run heroku run rails c and create a user interactively.