LoadError: cannot load such file -- jobs/regular/export_csv_file

I’m trying to add another site to the multisite setup that I have (I used Multisite Configuration with Let's Encrypt and no reverse proxy to set it up).

When I try to add the extra site, I run ./launcher rebuild data and it works fine but then on ./launcher rebuild web_only, I’m getting the following error:

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 955 exit 1>
Location of failure: /usr/local/lib/ruby/gems/2.7.0/gems/pups-1.1.1/lib/pups/exec_command.rb:117:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
8f0613418f5fed4e82de31b268e364dbf6345c8e736ea26ad2f7f87cd0f37f2d
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.

When I look up for earlier error messages, I find this:

I, [2022-03-29T19:47:39.173931 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
rake aborted!
LoadError: cannot load such file -- jobs/regular/export_csv_file
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:15:in `require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:15:in `require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.7/lib/active_support/dependencies/zeitwerk_integration.rb:51:in `require_dependency'
/var/www/discourse/lib/require_dependency_backward_compatibility.rb:18:in `require_dependency'
/var/www/discourse/plugins/discourse-legal-tools/plugin.rb:13:in `block in activate!'
/var/www/discourse/lib/plugin/instance.rb:486:in `block in notify_after_initialize'
/var/www/discourse/lib/plugin/instance.rb:484:in `each'
/var/www/discourse/lib/plugin/instance.rb:484:in `notify_after_initialize'
/var/www/discourse/config/application.rb:360:in `each'
/var/www/discourse/config/application.rb:360:in `block (2 levels) in <class:Application>'
/var/www/discourse/lib/plugin_initialization_guard.rb:5:in `plugin_initialization_guard'
/var/www/discourse/config/application.rb:359:in `block in <class:Application>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.7/lib/active_support/lazy_load_hooks.rb:68:in `block in execute_hook'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.7/lib/active_support/lazy_load_hooks.rb:61:in `with_execution_control'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.7/lib/active_support/lazy_load_hooks.rb:66:in `execute_hook'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.7/lib/active_support/lazy_load_hooks.rb:52:in `block in run_load_hooks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.7/lib/active_support/lazy_load_hooks.rb:51:in `each'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.7/lib/active_support/lazy_load_hooks.rb:51:in `run_load_hooks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.7/lib/rails/application/finisher.rb:140:in `block in <module:Finisher>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.7/lib/rails/initializable.rb:32:in `instance_exec'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.7/lib/rails/initializable.rb:32:in `run'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.7/lib/rails/initializable.rb:61:in `block in run_initializers'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.7/lib/rails/initializable.rb:60:in `run_initializers'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.7/lib/rails/application.rb:391:in `initialize!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.7/lib/rails/railtie.rb:207:in `public_send'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.7/lib/rails/railtie.rb:207:in `method_missing'
/var/www/discourse/config/environment.rb:7:in `<main>'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/bootsnap-1.11.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.7/lib/active_support/dependencies.rb:332:in `block in require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.7/lib/active_support/dependencies.rb:299:in `load_dependency'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/activesupport-6.1.4.7/lib/active_support/dependencies.rb:332:in `require'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.7/lib/rails/application.rb:367:in `require_environment!'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/railties-6.1.4.7/lib/rails/application.rb:533:in `block in run_tasks_blocks'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
Tasks: TOP => db:migrate => db:load_config => environment
(See full trace by running task with --trace)

When I remove the extra site info that I added in the data.yml and the web_only.yml to test it without the new site, the rebuild works fine.

I tried to comment out the plugins and the web_only rebuild didn’t work either—I would get other errors about certain columns missing from the new database related to the plugins.

Any idea what might be happening?

You might try to add the new site manually multisite.yml inside the container and then run the multisite migrate rake task.

You can rebuild the web_only without the new site?

You are running a third party plugin. Try rebuilding without it.

1 Like

I thought so, but just realized that I could rebuild it without the new site and with all the plugins commented out. When I try to rebuild without the new site and with the plugins, it doesn’t work.

I think the answer was there in the trace but I just didn’t see it: /var/www/discourse/plugins/discourse-legal-tools/plugin.rb:13:in block in activate!

…and as @Falco pointed out here:

I’ve disabled the Legal Tools Plugin and now I’m able to rebuild without and with the new site.

I tried to rebuild a singular install that I have that uses only the one app.yml file and it was also failing with the legal tools plugin.

So that seems to be the conflict, not sure where it’s conflicting though.

1 Like

Thanks for the report. Files have changed in core discourse which has broken the legal tools plugin. I’ll have time to update it early next week.

1 Like

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