After successfully configuring devise with users I am now trying to add an Admin role in preparation of using rails_admin.
I followed these instructions (https://github.com/plataformatec/devise/wiki/How-To:-Add-an-Admin-role) to add the admin role to devise even though the migration generated looked completely different from that in the instructions. I then ran "bundle exec rake db:migrate" only to get the error:
PG::Error: ERROR: relation "admins" already exists
At this point I had not attempted to install rails_admin because I wanted to get devise working fully first.
Any ideas why I got this error when I did not previously have an admin model?
Solution thanks to wildplasser: run db:drop -> db:create -> db:migrate to reset the database!
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