When I try to log in with the default admin user, I get "invalid email or password." Is there a way to create a user with code and try to log in that way?
I can log in on my live website, but not locally. My development code matches exactly what is on production.
Active Admin is a Ruby on Rails plugin for generating administration style interfaces. It abstracts common business application patterns to make it simple for developers to implement beautiful and elegant interfaces with very little effort.
another way is to place this file into db
directory and then run
rake db:seed
or in console
Rails.application.load_seed
there you can see how AdminUser
is created, as well
You can run a rails console
on your development server, and create a new admin user in the console itself.
The following is a typical sequence of such commands (change them according to your setup):
user = AdminUser.new
user.email = "<your email>"
user.password = "<your password>"
user.save
That will create the required admin for you. :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With