Closed mayeco closed 6 years ago
+1
currently there is guard check for assets related rake/rails tasks,
i guess to continue same approach we need to add just db:create(?:all)
.
Is there any drawback on rescuing NoDatabaseError? Seems like a more universal fix
I personally prefer a guard instead of rescue. https://github.com/influitive/apartment/pull/492
but it could be improved for more cases as @IngusSkaistkalns suggested
@mayeco It looks like you've endorsed https://github.com/influitive/apartment/pull/492. Should your related PR (https://github.com/influitive/apartment/pull/519) be closed?
Yes, I think is better #492, and #519 should be closed.
Steps to reproduce
rake db:create (the database not create)
Expected behavior
create the database
Actual behavior
fails
System configuration
Mac (rails 5.2beta)
Database: (Tell us what database and its version you use.)
Apartment version:
apartment (2.1.0)
Apartment config (in
config/initializers/apartment.rb
or so):use_schemas
: defaultRails (or ActiveRecord) version: 5.2
Ruby version: 2.4.3
Fix with this in apartment/lib/apartment/railtie.rb