Ι have started a Rails Spree project along with a friend, and we use GitHub for version control.
I have created the sample project in my machine, and installed Spree functionality on it. This creates a database with sample products, like so:
When my friend clones the project in his machine and imports it, running rails server
fails with MigrationException
and asks him to run rake db:migrate
.
Running rake db:migrate
fails after a few migrations, on nonexisting db column.
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
SQLite3::SQLException: no such column: spree_calculators.deleted_at: SELECT "spree_calculators".* FROM "spree_calculators" WHERE "spree_calculators"."deleted_at" IS NULL ORDER BY "spree_calculators"."id" ASC LIMIT 1000C:in `find_each'
C:/Users/User/xylino/xylino_serena/db/migrate/20151011115236_migrate_old_preferences.spree.rb:15:in `migrate_preferences'
C:/Users/User/xylino/xylino_serena/db/migrate/20151011115236_migrate_old_preferences.spree.rb:4:in `up'
C:in `migrate'
ActiveRecord::StatementInvalid: SQLite3::SQLException: no such column: spree_calculators.deleted_at: SELECT "spree_calculators".* FROM "spree_calculators" WHERE "spree_calculators"."deleted_at" IS NULL ORDER BY "spree_calculators"."id" ASC LIMIT 1000
C:in `find_each'
C:/Users/User/xylino/xylino_serena/db/migrate/20151011115236_migrate_old_preferences.spree.rb:15:in `migrate_preferences'
C:/Users/User/xylino/xylino_serena/db/migrate/20151011115236_migrate_old_preferences.spree.rb:4:in `up'
C:in `migrate'
SQLite3::SQLException: no such column: spree_calculators.deleted_at
C:in `find_each'
C:/Users/User/xylino/xylino_serena/db/migrate/20151011115236_migrate_old_preferences.spree.rb:15:in `migrate_preferences'
C:/Users/User/xylino/xylino_serena/db/migrate/20151011115236_migrate_old_preferences.spree.rb:4:in `up'
C:in `migrate'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
After that, running rails server
again is succesful, but no products or other items can be seen in his sample page, like so:
There has to be something wrong with the database. Parts or all of it are inaccessible, possibly due to security issues because we're sharing the db, but I cannot find a solution. Or maybe it's just a botched migration problem
Any ideas?