Getting: "Migrations are pending; run 'bin/rake db:migrate RAILS_ENV=development' to resolve this issue." after cloning and migrating the project

Interesting. Did you run rake db:create? Assuming you are using sqlite3, do this:

      rm -f db/*.sqlite3
      rake db:create
      RAILS_ENV=development rake db:migrate
      rails s -e development

Also, can you list the contents of your config/database.yml file?

Edit: Warning! Obviously, you will lose your existing data.


After running the migrate command, I still had the same error.

What worked for me was to just stop the rails server and start it again.


List your executed migrations with rake db:migrate:status and look if every migration was executed. You can try to cancel your migration with rake db:abort_if_pending_migrations and try to migrate again.