We write about Ruby on Rails, React.js, React Native, remote work, open source, engineering and design.
In Rails 6.1, Rails will skip modifications to the test database
SKIP_TEST_DATABASE is set to
> bundle exec rake db:create Created database 'app_name_development' Created database 'app_name_test'
> SKIP_TEST_DATABASE=true bundle exec rake db:create Created database 'app_name_development'
As we can see in the first example, both a
development and a
test database were created, which is unexpected when directly invoking
One obvious solution to this problem is to force the
development environment to only create a
However this solution will break
bin/setup as mentioned in this commit.
Hence the need for an environment variable to skip
test database creation.
Check out the pull request for more details.