Skip to content

Commit

Permalink
Fix CI for Rails 7.1.3
Browse files Browse the repository at this point in the history
`rake db:create:all` still isn't fixed (see [1]). Adapt template so
that we no longer need the development database.

[1] rails/rails#50038
  • Loading branch information
tf committed Jan 17, 2024
1 parent 6b38798 commit e02ec7a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions spec/support/pageflow/dummy/rails_template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def source_paths

rails_version_string = Rails::VERSION::STRING.tr!('.', '_')

engine_name = ENV.fetch('PAGEFLOW_PLUGIN_ENGINE', 'pageflow')
engine_name = ENV['PAGEFLOW_PLUGIN_ENGINE'].presence || 'pageflow'
database_prefix = "#{engine_name}-rails-#{rails_version_string}"

gsub_file('config/database.yml',
Expand Down Expand Up @@ -45,8 +45,7 @@ def source_paths

in_root { run('rake db:environment:set db:drop:all', capture: true, abort_on_failure: false) }

rake 'db:create' # workaround for https://github.com/rails/rails/issues/50038
rake 'db:create:all'
rake 'db:create'

# Install Webpacker

Expand Down Expand Up @@ -106,4 +105,4 @@ def source_paths
copy_file('add_custom_fields.rb',
'db/migrate/99990000000000_add_custom_fields.rb')

rake 'db:migrate db:test:load_schema', env: 'development'
rake 'db:migrate'

0 comments on commit e02ec7a

Please sign in to comment.