You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ensure_semester_and_settings_present initializer should not run on setup.
This breaks rake db:setup and even rake db:create because rails runs all initializer and this initializer causes a db does not exist error before database can be created.
Currently able to be resolved by commenting out the initializer then uncommenting it after running rake db:setup
After running rake db:setup without uncommenting:
rake aborted!
ActiveRecord::NoDatabaseError: FATAL: database "bp_site_development" does not exist
/home/freddy_kim8/calblueprint.org/config/initializers/ensure_semester_and_settings_present.rb:29:in `should_create?'/home/freddy_kim8/calblueprint.org/config/initializers/ensure_semester_and_settings_present.rb:7:in `execute'/home/freddy_kim8/calblueprint.org/config/initializers/ensure_semester_and_settings_present.rb:34:in `<top (required)>'/home/freddy_kim8/calblueprint.org/config/environment.rb:5:in `<top (required)>'
Caused by:
PG::ConnectionBad: FATAL: database "bp_site_development" does not exist
/home/freddy_kim8/calblueprint.org/config/initializers/ensure_semester_and_settings_present.rb:29:in `should_create?'/home/freddy_kim8/calblueprint.org/config/initializers/ensure_semester_and_settings_present.rb:7:in `execute'/home/freddy_kim8/calblueprint.org/config/initializers/ensure_semester_and_settings_present.rb:34:in `<top (required)>'/home/freddy_kim8/calblueprint.org/config/environment.rb:5:in `<top (required)>'
Tasks: TOP => db:setup => db:schema:load_if_ruby => db:create => db:load_config => environment
(See full trace by running task with --trace)
The text was updated successfully, but these errors were encountered:
ensure_semester_and_settings_present
initializer should not run on setup.This breaks
rake db:setup
and evenrake db:create
because rails runs all initializer and this initializer causes adb does not exist
error before database can be created.Currently able to be resolved by commenting out the initializer then uncommenting it after running
rake db:setup
After running
rake db:setup
without uncommenting:The text was updated successfully, but these errors were encountered: