active admin gem error

ActiveAdmin::DatabaseHitDuringLoad: Your file, app/models/receptionist.rb (line 3),
caused a database error while Active Admin was loading. This is most common when
your database is missing or doesn't have the latest migrations applied. To prevent this
error, move the code to a place where it will only be run when a page is rendered.
Original error message: PG::UndefinedTable: ERROR: relation "admin_users" does
not exist

把routes.rb下的
ActiveAdmin.routes(self) 改为
ActiveAdmin.routes(self) rescue ActiveAdmin::DatabaseHitDuringLoad

原文地址:https://www.cnblogs.com/chenzhenzhen/p/7504338.html