I got an error when trying to create an admin screen in Rails.
Terminal
rails g devise install
rails g active_admin:install
Where you hit
method_missing': undefined method
devise' for Install (call 'Install.connection' to establish a connection):Class (NoMethodError)
I got the error. Apparently devise is undefined? ??
I noticed later,
The ": (colon)" in rails g devise: install
is missing.
Delete the contents of config/routes.rb once.
Then run the rails db: rollback
command.
Run the rails g devise: install
and rails g active_admin: install
commands again.
You have successfully installed devise and activeadmin.
Does an error occur just because the ":" is omitted? I thought, but I think it was no good because it was actually an error. Even the command without the colon was displayed as if the database was created, so I was fooled. From now on, we will do it properly including the colon.
Recommended Posts