diowa/icare

Heroku Deploy Failure

Lewis-Pull opened this issue · 1 comments

Hi,
Attempting to deploy via Heroku and get the following error:

rails aborted!
ActiveRecord::ProtectedEnvironmentError: You are attempting to run a destructive action against your 'production' database.
If you are sure you want to continue, run the same command with the environment variable:
DISABLE_DATABASE_ENVIRONMENT_CHECK=1
/app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.4/lib/active_record/tasks/database_tasks.rb:63:in check_protected_environments!' /app/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.4.4/lib/active_record/railties/databases.rake:18:in block (2 levels) in

'
/app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in block in execute' /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in each'
/app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in execute' /app/vendor/bundle/ruby/3.0.0/gems/airbrake-12.0.0/lib/airbrake/rake.rb:17:in execute'
/app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:219:in block in invoke_with_call_chain' /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:199:in synchronize'
/app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:199:in invoke_with_call_chain' /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:243:in block in invoke_prerequisites'
/app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:241:in each' /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:241:in invoke_prerequisites'
/app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:218:in block in invoke_with_call_chain' /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:199:in synchronize'
/app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:199:in invoke_with_call_chain' /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:188:in invoke'
/app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:160:in invoke_task' /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in block (2 levels) in top_level'
/app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in each' /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in block in top_level'
/app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:125:in run_with_threads' /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:110:in top_level'
/app/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.4/lib/rails/commands/rake/rake_command.rb:24:in block (2 levels) in perform' /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:186:in standard_exception_handling'
/app/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.4/lib/rails/commands/rake/rake_command.rb:24:in block in perform' /app/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/lib/rake/rake_module.rb:59:in with_application'
/app/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.4/lib/rails/commands/rake/rake_command.rb:18:in perform' /app/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.4/lib/rails/command.rb:50:in invoke'
/app/vendor/bundle/ruby/3.0.0/gems/railties-6.1.4.4/lib/rails/commands.rb:18:in <main>' /app/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in require'
/app/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in block in require_with_bootsnap_lfi' /app/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/loaded_features_index.rb:100:in register'
/app/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in require_with_bootsnap_lfi' /app/vendor/bundle/ruby/3.0.0/gems/bootsnap-1.9.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in require'
Tasks: TOP => db:schema:load => db:check_protected_environments
(See full trace by running task with --trace)

Hi,

thanks for reporting this and apologies for the late reply

I've fixed the issue with the "Deploy to Heroku" button and I've also updated and tested the wiki with manual instructions to deploy on Heroku, it was very outdated