Impossibile localizzare Gemfile durante l'installazione del plugin Algolia

Riepilogo
Nel processo di installazione del plugin Algolia, quando vado a eseguire il primo indicizzamento, ricevo l’errore Could not locate Gemfile or .bundle/ directory eseguendo il comando LOAD_PLUGINS=1 bundle exec rails algolia:reindex.

Contesto
Si tratta di un sito self-hosted che utilizza un droplet DigitalOcean. Ho seguito le istruzioni ufficiali di installazione e tutto è andato bene. Il sito funziona e ora sto personalizzando l’aspetto, installando plugin, ecc.

Ho iniziato a installare il plugin Algolia secondo le istruzioni su github [1]. Tutto è andato come previsto fino al passaggio dell’indicizzamento iniziale.

Il comando da eseguire è LOAD_PLUGINS=1 bundle exec rails algolia:reindex e dice di eseguirlo “nella tua directory discourse” – presumo che sia /var/discourse poiché finora ha funzionato per tutto il resto.

L’errore che ricevo è Could not locate Gemfile or .bundle/ directory. Ho dato un’occhiata a questo post [2], ma non sono riuscito a capire bene cosa dovevo fare, ed è vecchio di 7 anni. Ho anche guardato la pagina di risoluzione dei problemi qui [3], ma non sono riuscito a trovare una soluzione. Per la cronaca, la versione di ruby è 3.1.2p20.

Il plugin Algolia è il primo plugin che ho installato. A parte l’aggiunta di un paio di categorie e la modifica di alcuni colori tramite l’interfaccia di amministrazione, non ho modificato il sito o l’installazione in alcun modo.

Ho la sensazione che il processo di installazione avrebbe dovuto creare un gemfile o una directory bundle/? Ho rivisto la procedura di installazione per assicurarmi di non aver saltato un passaggio e non credo di averlo fatto.

Avete qualche idea su cosa potrei aver fatto di sbagliato e/o cosa dovrei fare per far sì che il comando reindex abbia successo?

// Poiché il mio account è nuovissimo, mi è consentito aggiungere solo due link, quindi ecco il resto per riferimento:

  1. github [dot] com/discourse/discourse-algolia?tab=readme-ov-file#discourse-algolia-beta
  2. meta.discourse [dot] org/t/bundle-install-could-not-locate-gemfile-or-bundle-directory/41292
  3. github [dot] com/discourse/discourse/blob/main/docs/TROUBLESHOOTING.md
1 Mi Piace

Solo per confermare che hai seguito le istruzioni di installazione qui?

Il link era nell’Op per il plugin.

Grazie per la conferma @Heliosurge – sì, per il plugin Algolia ho seguito quelle istruzioni

1 Mi Piace

Devi essere all’interno del container, quindi prima di eseguire quel comando fai questo

cd /var/discourse
./launcher enter app
cd /var/www/discourse

Thank you @pfaffman, that is very helpful clarification

I’m still unable to get that particular command to work, but it’s not clear that it matters after all because I can successfully run rake algolia:reindex. Looking at the Algolia dashboard everything appears as I would expect. And, most importantly, the end user experience of using Algolia instead of the default search bar is working as I would expect.

For posterity, the error I was getting when I tried to run LOAD_PLUGINS=1 bundle exec rails algolia:reindex was the following.

fatal: detected dubious ownership in repository at '/var/www/discourse'
To add an exception for this directory, call:

        git config --global --add safe.directory /var/www/discourse
rails aborted!
ActiveRecord::NoDatabaseError: We could not find your database: discourse. Which can be found in the database configuration file located at config/database.yml. (ActiveRecord::NoDatabaseError)

To resolve this issue:

- Did you create the database for this app, or delete it? You may need to create your database.
- Has the database name changed? Check your database.yml config has the correct database name.

To create your database, run:

        bin/rails db:create
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/postgresql_adapter.rb:81:in `rescue in new_client'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/postgresql_adapter.rb:77:in `new_client'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `postgresql_connection'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:656:in `public_send'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:656:in `new_connection'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:700:in `checkout_new_connection'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:679:in `try_to_checkout_new_connection'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:640:in `acquire_connection'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:341:in `checkout'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:181:in `connection'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/connection_handler.rb:211:in `retrieve_connection'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_handling.rb:313:in `retrieve_connection'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_handling.rb:280:in `connection'
/var/www/discourse/lib/site_settings/db_provider.rb:58:in `table_exists?'
/var/www/discourse/lib/site_settings/db_provider.rb:14:in `all'
/var/www/discourse/lib/site_settings/defaults_provider.rb:30:in `db_all'
/var/www/discourse/lib/site_setting_extension.rb:260:in `block in refresh!'
/var/www/discourse/lib/site_setting_extension.rb:253:in `synchronize'
/var/www/discourse/lib/site_setting_extension.rb:253:in `refresh!'
/var/www/discourse/lib/site_setting_extension.rb:528:in `block in setup_methods'
/var/www/discourse/config/initializers/100-push-notifications.rb:13:in `block in <main>'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/callbacks.rb:445:in `instance_exec'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/callbacks.rb:445:in `block in make_lambda'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/callbacks.rb:199:in `block (2 levels) in halting'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/callbacks.rb:687:in `block (2 levels) in default_terminator'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/callbacks.rb:686:in `catch'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/callbacks.rb:686:in `block in default_terminator'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/callbacks.rb:200:in `block in halting'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/callbacks.rb:595:in `block in invoke_before'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/callbacks.rb:595:in `each'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/callbacks.rb:595:in `invoke_before'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/callbacks.rb:106:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/reloader.rb:88:in `prepare!'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/application/finisher.rb:68:in `block in <module:Finisher>'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/initializable.rb:32:in `instance_exec'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/initializable.rb:32:in `run'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/initializable.rb:61:in `block in run_initializers'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/initializable.rb:60:in `run_initializers'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/application.rb:372:in `initialize!'
/var/www/discourse/config/environment.rb:7:in `<main>'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/application.rb:348:in `require_environment!'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/application.rb:506:in `block in run_tasks_blocks'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:281:in `block in execute'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:281:in `each'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:281:in `execute'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:199:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:199:in `invoke_with_call_chain'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:243:in `block in invoke_prerequisites'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:241:in `each'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:241:in `invoke_prerequisites'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:199:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:199:in `invoke_with_call_chain'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:188:in `invoke'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:182:in `invoke_task'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:138:in `block (2 levels) in top_level'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:138:in `each'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:138:in `block in top_level'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:147:in `run_with_threads'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:132:in `top_level'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/commands/rake/rake_command.rb:24:in `block (2 levels) in perform'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:208:in `standard_exception_handling'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/commands/rake/rake_command.rb:24:in `block in perform'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/rake_module.rb:59:in `with_application'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/command.rb:51:in `invoke'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/commands.rb:18:in `<main>'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'

Caused by:
PG::ConnectionBad: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  Peer authentication failed for user "discourse" (PG::ConnectionBad)
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/pg-1.5.4/lib/pg/connection.rb:696:in `async_connect_or_reset'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/pg-1.5.4/lib/pg/connection.rb:824:in `connect_to_hosts'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/pg-1.5.4/lib/pg/connection.rb:759:in `new'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/pg-1.5.4/lib/pg.rb:63:in `connect'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/postgresql_adapter.rb:78:in `new_client'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/postgresql_adapter.rb:37:in `postgresql_connection'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:656:in `public_send'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:656:in `new_connection'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:700:in `checkout_new_connection'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:679:in `try_to_checkout_new_connection'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:640:in `acquire_connection'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:341:in `checkout'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/connection_pool.rb:181:in `connection'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_adapters/abstract/connection_handler.rb:211:in `retrieve_connection'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_handling.rb:313:in `retrieve_connection'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activerecord-7.0.7/lib/active_record/connection_handling.rb:280:in `connection'
/var/www/discourse/lib/site_settings/db_provider.rb:58:in `table_exists?'
/var/www/discourse/lib/site_settings/db_provider.rb:14:in `all'
/var/www/discourse/lib/site_settings/defaults_provider.rb:30:in `db_all'
/var/www/discourse/lib/site_setting_extension.rb:260:in `block in refresh!'
/var/www/discourse/lib/site_setting_extension.rb:253:in `synchronize'
/var/www/discourse/lib/site_setting_extension.rb:253:in `refresh!'
/var/www/discourse/lib/site_setting_extension.rb:528:in `block in setup_methods'
/var/www/discourse/config/initializers/100-push-notifications.rb:13:in `block in <main>'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/callbacks.rb:445:in `instance_exec'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/callbacks.rb:445:in `block in make_lambda'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/callbacks.rb:199:in `block (2 levels) in halting'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/callbacks.rb:687:in `block (2 levels) in default_terminator'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/callbacks.rb:686:in `catch'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/callbacks.rb:686:in `block in default_terminator'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/callbacks.rb:200:in `block in halting'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/callbacks.rb:595:in `block in invoke_before'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/callbacks.rb:595:in `each'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/callbacks.rb:595:in `invoke_before'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/callbacks.rb:106:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/activesupport-7.0.7/lib/active_support/reloader.rb:88:in `prepare!'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/application/finisher.rb:68:in `block in <module:Finisher>'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/initializable.rb:32:in `instance_exec'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/initializable.rb:32:in `run'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/initializable.rb:61:in `block in run_initializers'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/initializable.rb:60:in `run_initializers'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/application.rb:372:in `initialize!'
/var/www/discourse/config/environment.rb:7:in `<main>'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/application.rb:348:in `require_environment!'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/application.rb:506:in `block in run_tasks_blocks'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:281:in `block in execute'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:281:in `each'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:281:in `execute'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:199:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:199:in `invoke_with_call_chain'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:243:in `block in invoke_prerequisites'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:241:in `each'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:241:in `invoke_prerequisites'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:218:in `block in invoke_with_call_chain'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:199:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:199:in `invoke_with_call_chain'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/task.rb:188:in `invoke'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:182:in `invoke_task'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:138:in `block (2 levels) in top_level'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:138:in `each'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:138:in `block in top_level'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:147:in `run_with_threads'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:132:in `top_level'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/commands/rake/rake_command.rb:24:in `block (2 levels) in perform'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/application.rb:208:in `standard_exception_handling'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/commands/rake/rake_command.rb:24:in `block in perform'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/rake-13.1.0/lib/rake/rake_module.rb:59:in `with_application'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/command.rb:51:in `invoke'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/commands.rb:18:in `<main>'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
Tasks: TOP => algolia:reindex => environment
(See full trace by running task with --trace)

I also ran the command with sudo -u discourse LOAD_PLUGINS=1 bundle exec rails algolia:reindex and that error is also below in case it’s helpful for anyone.

rails aborted!
LoadError: cannot load such file -- rspec/core/rake_task (LoadError)
<internal:/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
<internal:/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'
/var/www/discourse/lib/tasks/rspec.rake:4:in `<main>'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/engine.rb:661:in `load'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/engine.rb:661:in `block in run_tasks_blocks'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/engine.rb:661:in `each'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/engine.rb:661:in `run_tasks_blocks'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/application.rb:501:in `run_tasks_blocks'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/engine.rb:464:in `load_tasks'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/railtie.rb:226:in `public_send'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/railtie.rb:226:in `method_missing'
/var/www/discourse/Rakefile:9:in `<main>'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/commands/rake/rake_command.rb:20:in `block in perform'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/command.rb:51:in `invoke'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/railties-7.0.7/lib/rails/commands.rb:18:in `<main>'
<internal:/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
<internal:/usr/local/lib/ruby/site_ruby/3.2.0/rubygems/core_ext/kernel_require.rb>:38:in `require'
/var/www/discourse/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'
bin/rails:18:in `<main>'
(See full trace by running task with --trace)
1 Mi Piace

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.