mercredi 21 mars 2018

Rails: non-existent databases causing errors only after team pulls from from version control.

During my recent work I created a new database table I then decided not to use. In fact It was never actually in use on my rails application. I ended up creating a new migration before making the decision to go a different direction So in order to remove the I rolled back the unneeded migration using

db:rollback STEP=2

I completed the functionality that I wanted and pushed to version control. At no point was a migration involving the unwanted table on version control. However I did mistakenly upload the fixtures.yml file for the other table.

Here is what is odd. Although the fixtures.yml has been removed from both my and my teammates environments. Tests only run successfully on my environment on each of my teammates environment they get an error:

Error:
StaticPagesControllerTest#test_should_get_home:
ActiveRecord::StatementInvalid: SQLite3::SQLException: no such table: 
(table): DELETE FROM "(table)"


Error:
StaticPagesControllerTest#test_should_get_home:
NoMethodError: undefined method `each' for nil:NilClass

Or something similar for each test, resulting in all tests returning in error. On my environment, As I said all tests pass successfully.

I have seen the answer that can be found Here However, like I said the yml file and all other associated file have already been deleted on all machines.

Any help appreciated. thanks!

Aucun commentaire:

Enregistrer un commentaire