A rails 5.2.3 (ruby 2.5.1p57) app worked perfectly locally.
I ran rake db:drop to remove it, then rake db:reset to reset, migrate and seed, and it did so perfectly. 
Then, for unrelated reasons, I dropped it again in the same way but when I recreated it with rake db:reset I got the following error
rake aborted!
ActiveRecord::NoDatabaseError: FATAL:  database "appname_development" does not exist
I have tried 
rake db:create:all as set out here
also
bundle exec rake db:create as set out here and in most other answers
It appears the symptom is common, but the main antedotes don't seem to help in my case. It's also really odd that I ran the same thing moments earlier and it worked, and seemingly nothing had changed in between
