I'm running the rails-dev-box on Vagrant, with a folder shared between the box and my Windows computer. Rails version 5.0.5. I have a very basic app using a sqlite3 database, and a basic generated scaffold for a model. When I ran bin/rails test
I received this error:
ActiveRecord::Tasks::DatabaseAlreadyExists
A link in this GitHub thread pointed to this SO question, and I followed this answer - I edited database.yml
to change the location of the databases to a location outside of the shared folder. I then re-migrated the databases with bin/rails db:migrate
. This seemed to help a bit, because the next time I ran bin/rails test
I received a different error:
Migrations are pending. To resolve this issue, run: bin/rails db:migrate RAILS_ENV=test
But even after running bin/rails db:migrate RAILS_ENV=test
I still receive this error each time I try to run the test.
Aucun commentaire:
Enregistrer un commentaire