I am very new in Rails. after I created a new rails project.
rails new test project
I ran
rake db:create
In
I just had the same issue. I didn't solve it fully but by running:
bundle exec rake
I was able to finally run the task I wanted without the error you have.