Skip to content

Commit

Permalink
Setup - Split db:reset to db:drop and set:up
Browse files Browse the repository at this point in the history
I'm still looking into why exactly this is happening, but solution has
been consistent for me.

To reproduce the issue for yourself:
When CI runs for each version, it does so using the specific Gemfile for
the version.
Running
`BUNDLE_GEMFILE=gemfiles/rails_7.1.gemfile RAILS_ENV=test
bundle exec rake dummy:db:reset`
and then
`bundle exec appraisal rake'
the Users table will not be found, because it is not created from this
command.

This issue only exists with the 7.1 gemfile that I've found.

Splitting the command db:reset to its component parts of db:drop and
db:setup on separate lines works - for all version. Using them on a
single line does not work, though.
  • Loading branch information
sej3506 committed Dec 8, 2023
1 parent 2cf5a8a commit d392590
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ if [ -z "$CI" ]; then
fi

# Set up database for the application that Clearance tests against
RAILS_ENV=test bundle exec rake dummy:db:reset
RAILS_ENV=test bundle exec rake dummy:db:drop
RAILS_ENV=test bundle exec rake dummy:db:setup

0 comments on commit d392590

Please sign in to comment.