I ran:
rails g active_admin:install
and got this error:
Invalid route name, already in use: \'admin_root\' (ArgumentError)
You
So I found someone having the same problem in this issue-- but that says the problem is that ActiveAdmin puts ActiveAdmin.routes(self)
in your config/routes.rb
file twice.
However, your routes doesn't have that line at all-- which I'm guessing is because you ran rails destroy active_admin:install
, but that doesn't explain why you're STILL getting that error after destroying.
Are you using git? Can you see if there were any other modifications made by the generate that might not have been cleaned up by the destroy? The ActiveAdmin issue also hints that if an error happens during generation, the generation doesn't finish correctly.
Another thing to try would be run the generator again, then check your routes and make sure ActiveAdmin.routes(self)
only appears once.
Solved it by uninstalling ActiveAdmin, reinstalling it, deleting the second ActiveAdmin.routes(self) in my routes file, then deleting my schema file. After that, I ran rake db:reset
and remigrated the database.