L'installazione dello sviluppo fallisce quando si esegue bin/rails db:migrate

Basically, I am trying to do a dev install on my Pi, following this guide. I ran bin/rails db:create, which worked fine. Then when trying to run bin/rails db:migrate, it ends by saying something about oxipng binary file not working? It tells me to either put a proper binary file or use some command (I cannot remember it exactly, I’ll tell you why).
But, um, my VNC lagged out when doing this (I think the processing was too much? I did a bin/ember-cli -u even with this oxipng thing. Anyway, I then clicked on something and all I say was a grey screen. I closed the VNC session and tried to reconnect. Nothing happened for a long time. I disconnected and reconnected my Pi (yes, force shut down. Very bad.). As such, I don’t know that oxipng message much.
Tried again to run bin/rails db:migrate, and this was the error (same error as well when running RAILS_ENV=test bin/rails db:create db:migrate):

== 20241024093027 RemoveCategoryExpertsWebHookEventTypes: migrating ===========
-- execute("DELETE FROM web_hook_event_types WHERE (name, id) IN (('category_experts_approved', 1901), ('category_experts_unapproved', 1902))")
   -> 0.0011s
== 20241024093027 RemoveCategoryExpertsWebHookEventTypes: migrated (0.0029s) ==

/home/natedhaliwal/discourse-f/app/models/post_action_type.rb:16:in `expire_cache'
/home/natedhaliwal/discourse-f/app/models/post_action_type.rb:42:in `reload_types'
/home/natedhaliwal/discourse-f/app/models/flag.rb:37:in `reset_flag_settings!'
(eval):78:in `block (2 levels) in run_file'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:46:in `eval'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:46:in `block (2 levels) in run_file'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:58:in `block in open'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:57:in `open'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:57:in `open'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:36:in `block in run_file'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/activerecord-7.1.4.1/lib/active_record/connection_adapters/abstract/transaction.rb:535:in `block in within_new_transaction'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/activesupport-7.1.4.1/lib/active_support/concurrency/null_lock.rb:9:in `synchronize'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/activerecord-7.1.4.1/lib/active_record/connection_adapters/abstract/transaction.rb:532:in `within_new_transaction'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/activerecord-7.1.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:344:in `transaction'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/activerecord-7.1.4.1/lib/active_record/transactions.rb:212:in `transaction'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:35:in `run_file'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:26:in `block in run'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:25:in `each'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:25:in `run'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/discourse-seed-fu.rb:29:in `seed'
/home/natedhaliwal/discourse-f/lib/tasks/db.rake:264:in `block (2 levels) in <main>'
/home/natedhaliwal/discourse-f/lib/distributed_mutex.rb:53:in `block in synchronize'
/home/natedhaliwal/discourse-f/lib/distributed_mutex.rb:49:in `synchronize'
/home/natedhaliwal/discourse-f/lib/distributed_mutex.rb:49:in `synchronize'
/home/natedhaliwal/discourse-f/lib/distributed_mutex.rb:34:in `synchronize'
/home/natedhaliwal/discourse-f/lib/tasks/db.rake:234:in `block in <main>'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/task.rb:281:in `block in execute'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/task.rb:281:in `each'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/task.rb:281:in `execute'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/task.rb:199:in `synchronize'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/task.rb:188:in `invoke'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/application.rb:188:in `invoke_task'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/application.rb:138:in `block (2 levels) in top_level'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/application.rb:138:in `each'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/application.rb:138:in `block in top_level'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/application.rb:147:in `run_with_threads'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/application.rb:132:in `top_level'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:27:in `block (2 levels) in perform'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/application.rb:214:in `standard_exception_handling'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:27:in `block in perform'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:44:in `block in with_rake'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/rake_module.rb:59:in `with_application'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:41:in `with_rake'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/command.rb:156:in `invoke_rake'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/command.rb:73:in `block in invoke'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/command.rb:149:in `with_argv'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/command.rb:69:in `invoke'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/commands.rb:18:in `<main>'
<internal:/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
<internal:/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
bin/rails:18:in `<main>'
bin/rails aborted!
ActiveRecord::RecordNotFound: Couldn't find Upload with 'id'=-6 (ActiveRecord::RecordNotFound)
/home/natedhaliwal/discourse-f/lib/site_icon_manager.rb:119:in `resolve_original'
/home/natedhaliwal/discourse-f/lib/site_icon_manager.rb:71:in `block in ensure_optimized!'
/home/natedhaliwal/discourse-f/lib/site_icon_manager.rb:70:in `each'
/home/natedhaliwal/discourse-f/lib/site_icon_manager.rb:70:in `ensure_optimized!'
/home/natedhaliwal/discourse-f/lib/tasks/db.rake:272:in `block (2 levels) in <main>'
/home/natedhaliwal/discourse-f/lib/distributed_mutex.rb:53:in `block in synchronize'
/home/natedhaliwal/discourse-f/lib/distributed_mutex.rb:49:in `synchronize'
/home/natedhaliwal/discourse-f/lib/distributed_mutex.rb:49:in `synchronize'
/home/natedhaliwal/discourse-f/lib/distributed_mutex.rb:34:in `synchronize'
/home/natedhaliwal/discourse-f/lib/tasks/db.rake:234:in `block in <main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

When running it with --trace, I get:

natedhaliwal@raspberrypi:~/discourse-f $ RAILS_ENV=test bin/rails db:create db:migrate --trace
** Invoke db:create (first_time)
** Invoke db:force_skip_persist (first_time)
** Execute db:force_skip_persist
** Invoke db:load_config (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:load_config
** Execute db:create
Database 'discourse_test' already exists
Database 'discourse_test_multisite' already exists
** Invoke db:migrate (first_time)
** Invoke db:load_config 
** Invoke environment 
** Invoke set_locale (first_time)
** Execute set_locale
** Invoke assets:precompile:theme_transpiler (first_time)
** Invoke environment 
** Execute assets:precompile:theme_transpiler
** Execute db:migrate
/home/natedhaliwal/discourse-f/app/models/post_action_type.rb:16:in `expire_cache'
/home/natedhaliwal/discourse-f/app/models/post_action_type.rb:42:in `reload_types'
/home/natedhaliwal/discourse-f/app/models/flag.rb:37:in `reset_flag_settings!'
(eval):78:in `block (2 levels) in run_file'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:46:in `eval'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:46:in `block (2 levels) in run_file'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:58:in `block in open'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:57:in `open'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:57:in `open'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:36:in `block in run_file'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/activerecord-7.1.4.1/lib/active_record/connection_adapters/abstract/transaction.rb:535:in `block in within_new_transaction'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/activesupport-7.1.4.1/lib/active_support/concurrency/null_lock.rb:9:in `synchronize'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/activerecord-7.1.4.1/lib/active_record/connection_adapters/abstract/transaction.rb:532:in `within_new_transaction'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/activerecord-7.1.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:344:in `transaction'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/activerecord-7.1.4.1/lib/active_record/transactions.rb:212:in `transaction'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:35:in `run_file'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:26:in `block in run'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:25:in `each'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:25:in `run'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/discourse-seed-fu.rb:29:in `seed'
/home/natedhaliwal/discourse-f/lib/tasks/db.rake:264:in `block (2 levels) in <main>'
/home/natedhaliwal/discourse-f/lib/distributed_mutex.rb:53:in `block in synchronize'
/home/natedhaliwal/discourse-f/lib/distributed_mutex.rb:49:in `synchronize'
/home/natedhaliwal/discourse-f/lib/distributed_mutex.rb:49:in `synchronize'
/home/natedhaliwal/discourse-f/lib/distributed_mutex.rb:34:in `synchronize'
/home/natedhaliwal/discourse-f/lib/tasks/db.rake:234:in `block in <main>'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/task.rb:281:in `block in execute'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/task.rb:281:in `each'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/task.rb:281:in `execute'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/task.rb:199:in `synchronize'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/task.rb:188:in `invoke'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/application.rb:188:in `invoke_task'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/application.rb:138:in `block (2 levels) in top_level'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/application.rb:138:in `each'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/application.rb:138:in `block in top_level'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/application.rb:147:in `run_with_threads'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/application.rb:132:in `top_level'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:27:in `block (2 levels) in perform'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/application.rb:214:in `standard_exception_handling'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:27:in `block in perform'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:44:in `block in with_rake'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/rake_module.rb:59:in `with_application'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:41:in `with_rake'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/command.rb:156:in `invoke_rake'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/command.rb:73:in `block in invoke'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/command.rb:149:in `with_argv'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/command.rb:69:in `invoke'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/commands.rb:18:in `<main>'
<internal:/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
<internal:/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
bin/rails:18:in `<main>'
bin/rails aborted!
ActiveRecord::RecordNotFound: Couldn't find Upload with 'id'=-6 (ActiveRecord::RecordNotFound)
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/activerecord-7.1.4.1/lib/active_record/core.rb:253:in `find'
/home/natedhaliwal/discourse-f/lib/site_icon_manager.rb:119:in `resolve_original'
/home/natedhaliwal/discourse-f/lib/site_icon_manager.rb:71:in `block in ensure_optimized!'
/home/natedhaliwal/discourse-f/lib/site_icon_manager.rb:70:in `each'
/home/natedhaliwal/discourse-f/lib/site_icon_manager.rb:70:in `ensure_optimized!'
/home/natedhaliwal/discourse-f/lib/tasks/db.rake:272:in `block (2 levels) in <main>'
/home/natedhaliwal/discourse-f/lib/distributed_mutex.rb:53:in `block in synchronize'
/home/natedhaliwal/discourse-f/lib/distributed_mutex.rb:49:in `synchronize'
/home/natedhaliwal/discourse-f/lib/distributed_mutex.rb:49:in `synchronize'
/home/natedhaliwal/discourse-f/lib/distributed_mutex.rb:34:in `synchronize'
/home/natedhaliwal/discourse-f/lib/tasks/db.rake:234:in `block in <main>'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/task.rb:281:in `block in execute'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/task.rb:281:in `each'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/task.rb:281:in `execute'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/task.rb:199:in `synchronize'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/task.rb:188:in `invoke'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/application.rb:188:in `invoke_task'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/application.rb:138:in `block (2 levels) in top_level'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/application.rb:138:in `each'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/application.rb:138:in `block in top_level'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/application.rb:147:in `run_with_threads'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/application.rb:132:in `top_level'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:27:in `block (2 levels) in perform'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/application.rb:214:in `standard_exception_handling'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:27:in `block in perform'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:44:in `block in with_rake'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/rake_module.rb:59:in `with_application'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:41:in `with_rake'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/command.rb:156:in `invoke_rake'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/command.rb:73:in `block in invoke'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/command.rb:149:in `with_argv'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/command.rb:69:in `invoke'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/commands.rb:18:in `<main>'
<internal:/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
<internal:/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:37:in `require'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
bin/rails:18:in `<main>'
Tasks: TOP => db:migrate

Any thoughts on what I should do?

Hmm, la risposta è probabilmente questa riga:

ActiveRecord::RecordNotFound: Impossibile trovare Upload con 'id'=-6 (ActiveRecord::RecordNotFound)
/home/natedhaliwal/discourse-f/lib/site_icon_manager.rb:119:in `resolve_original'
/home/natedhaliwal/discourse-f/lib/site_icon_manager.rb:71:in `block in ensure_optimized!'
/home/natedhaliwal/discourse-f/lib/site_icon_manager.rb:70:in `each'

Hai rimosso di recente un’icona?

Un’icona? Intendi come un’icona immagine (ad esempio, FA)?

Apri la console di Rails e ispeziona la tabella uploads per verificare che l’ID = -6 sia mancante:

RAILS_ENV=test bin/rails console
Upload.find_by(id: -6)

L’errore indica che il record con ID = -6 è stato eliminato. Sarà necessario aggiornare i dati seed o i fixture di conseguenza nel tuo ambiente di test.

1 Mi Piace

Ciao, anch’io ho lo stesso problema, ma mi sono bloccato prima che l’installazione finisse, quindi non ho bin/rails… come posso risolvere? E non posso accedere all’app (./launcher enter app) la cartella bin è vuota

@woozievert, per favore condividi la traccia dettagliata del tuo errore

stesso errore:

FALLITO
--------------------
Pups::ExecError: cd /var/www/discourse & su discourse -c 'bundle exec rake db:migrate' fallito con ritorno #<Process::Status: pid 1962 exit 1>
Posizione del fallimento: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec fallito con i parametri {"cd"=>"$home", "tag"=>"migrate", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
bootstrap fallito con codice di uscita 1
** FALLITO IL BOOTSTRAP ** scorrere verso l'alto e cercare messaggi di errore precedenti, potrebbero essercene più di uno.
./discourse-doctor potrebbe aiutare a diagnosticare il problema.
ActiveRecord::RecordNotFound: Impossibile trovare Upload con 'id'=-6 (ActiveRecord::RecordNotFound)
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/activerecord-7.1.4.1/lib/active_record/core.rb:253:in `find'
/var/www/discourse/lib/site_icon_manager.rb:119:in `resolve_original'
/var/www/discourse/lib/site_icon_manager.rb:71:in `block in ensure_optimized!'
/var/www/discourse/lib/site_icon_manager.rb:70:in `each'
/var/www/discourse/lib/site_icon_manager.rb:70:in `ensure_optimized!'
/var/www/discourse/lib/tasks/db.rake:272:in `block (2 levels) in <main>'
/var/www/discourse/lib/distributed_mutex.rb:53:in `block in synchronize'
/var/www/discourse/lib/distributed_mutex.rb:49:in `synchronize'
/var/www/discourse/lib/distributed_mutex.rb:49:in `synchronize'
/var/www/discourse/lib/distributed_mutex.rb:34:in `synchronize'
/var/www/discourse/lib/tasks/db.rake:234:in `block in <main>'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.2.1/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
Tasks: TOP => db:migrate
(Vedere la traccia completa eseguendo il task con --trace)
1 Mi Piace

Mi sono dimenticato di risponderti, scusa.

Ho eseguito questo e ho ottenuto nil.

natedhaliwal@raspberrypi:~/discourse-f $ RAILS_ENV=test bin/rails db:create db:migrate
Database 'discourse_test' already exists
Database 'discourse_test_multisite' already exists
/home/natedhaliwal/discourse-f/app/models/post_action_type.rb:16:in `expire_cache'
/home/natedhaliwal/discourse-f/app/models/post_action_type.rb:42:in `reload_types'
/home/natedhaliwal/discourse-f/app/models/flag.rb:37:in `reset_flag_settings!'
(eval):78:in `block (2 levels) in run_file'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:46:in `eval'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:46:in `block (2 levels) in run_file'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:58:in `block in open'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:57:in `open'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:57:in `open'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:36:in `block in run_file'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/activerecord-7.1.4.1/lib/active_record/connection_adapters/abstract/transaction.rb:535:in `block in within_new_transaction'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/activesupport-7.1.4.1/lib/active_support/concurrency/null_lock.rb:9:in `synchronize'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/activerecord-7.1.4.1/lib/active_record/connection_adapters/abstract/transaction.rb:532:in `within_new_transaction'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/activerecord-7.1.4.1/lib/active_record/connection_adapters/abstract/database_statements.rb:344:in `transaction'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/activerecord-7.1.4.1/lib/active_record/transactions.rb:212:in `transaction'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:35:in `run_file'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:26:in `block in run'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:25:in `each'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/seed-fu/runner.rb:25:in `run'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/discourse-seed-fu-2.3.12/lib/discourse-seed-fu.rb:29:in `seed'
/home/natedhaliwal/discourse-f/lib/tasks/db.rake:264:in `block (2 levels) in <main>'
/home/natedhaliwal/discourse-f/lib/distributed_mutex.rb:53:in `block in synchronize'
/home/natedhaliwal/discourse-f/lib/distributed_mutex.rb:49:in `synchronize'
/home/natedhaliwal/discourse-f/lib/distributed_mutex.rb:49:in `synchronize'
/home/natedhaliwal/discourse-f/lib/distributed_mutex.rb:34:in `synchronize'
/home/natedhaliwal/discourse-f/lib/tasks/db.rake:234:in `block in <main>'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/task.rb:281:in `block in execute'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/task.rb:281:in `each'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/task.rb:281:in `execute'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/task.rb:199:in `synchronize'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/task.rb:188:in `invoke'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/application.rb:188:in `invoke_task'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/application.rb:138:in `block (2 levels) in top_level'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/application.rb:138:in `each'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/application.rb:138:in `block in top_level'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/application.rb:147:in `run_with_threads'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/application.rb:132:in `top_level'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:27:in `block (2 levels) in perform'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/application.rb:214:in `standard_exception_handling'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:27:in `block in perform'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:44:in `block in with_rake'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/rake-13.2.1/lib/rake/rake_module.rb:59:in `with_application'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:41:in `with_rake'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/commands/rake/rake_command.rb:20:in `perform'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/command.rb:156:in `invoke_rake'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/command.rb:73:in `block in invoke'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/command.rb:149:in `with_argv'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/command.rb:69:in `invoke'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/gems/railties-7.1.4.1/lib/rails/commands.rb:18:in `<main>'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb:37:in `require'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb:37:in `require'
/home/natedhaliwal/.rbenv/versions/3.2.1/lib/ruby/gems/3.2.0/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
bin/rails:18:in `<main>'
bin/rails aborted!
ActiveRecord::RecordNotFound: Couldn't find Upload with 'id'=-6 (ActiveRecord::RecordNotFound)
/home/natedhaliwal/discourse-f/lib/site_icon_manager.rb:119:in `resolve_original'
/home/natedhaliwal/discourse-f/lib/site_icon_manager.rb:71:in `block in ensure_optimized!'
/home/natedhaliwal/discourse-f/lib/site_icon_manager.rb:70:in `each'
/home/natedhaliwal/discourse-f/lib/site_icon_manager.rb:70:in `ensure_optimized!'
/home/natedhaliwal/discourse-f/lib/tasks/db.rake:272:in `block (2 levels) in <main>'
/home/natedhaliwal/discourse-f/lib/distributed_mutex.rb:53:in `block in synchronize'
/home/natedhaliwal/discourse-f/lib/distributed_mutex.rb:49:in `synchronize'
/home/natedhaliwal/discourse-f/lib/distributed_mutex.rb:49:in `synchronize'
/home/natedhaliwal/discourse-f/lib/distributed_mutex.rb:34:in `synchronize'
/home/natedhaliwal/discourse-f/lib/tasks/db.rake:234:in `block in <main>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

natedhaliwal@raspberrypi:~/discourse-f $ RAILS_ENV=test bin/rails console
Loading test environment (Rails 7.1.4.1)
irb(main):001> Upload.find_by(id: -6)
=> nil
irb(main):002> 

natedhaliwal@raspberrypi:~/discourse-f $ 

A quale passaggio sei attualmente? Hai già clonato Discourse?

Sto usando l’installazione di docker

1 Mi Piace

Mi sono appena imbattuto in questo durante la creazione di un nuovo db locale e la migrazione.

Sfortunatamente, penso che sia stato introdotto da FIX: reset cache after flags are seed by lis2 · Pull Request #28801 · discourse/discourse · GitHub. Le migrazioni completamente nuove da zero non sono ora possibili.

@kris.kotlarek potresti dare un’occhiata per favore. Credo che toccare la cache di redis nell’initializer possa essere il problema.

2 Mi Piace

Grazie per il report @NateDhaliwal

Kris ha risolto il problema con

Dovremmo essere a posto ora!

3 Mi Piace

Questo argomento è stato chiuso automaticamente dopo 2 giorni. Non sono più consentite nuove risposte.