# LoadError: cannot load such file -- jobs/regular/export\_csv\_file

**URL:** https://meta.discourse.org/t/loaderror-cannot-load-such-file-jobs-regular-export-csv-file/222425
**Category:** Support
**Created:** [March 29, 2022, 8:06pm UTC](https://meta.discourse.org/t/loaderror-cannot-load-such-file-jobs-regular-export-csv-file/222425 "2022-03-29T20:06:44Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![jimkleiber](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jimkleiber/32/121814_2.png) [@jimkleiber](https://meta.discourse.org/u/jimkleiber)
#### Post date: [March 29, 2022, 8:06pm UTC](https://meta.discourse.org/t/loaderror-cannot-load-such-file-jobs-regular-export-csv-file/222425/1 "2022-03-29T20:06:44Z")

</div>

I’m trying to add another site to the multisite setup that I have (I used [Setup Multisite Configuration with Let's Encrypt and no Reverse Proxy](https://meta.discourse.org/t/multisite-configuration-with-lets-encrypt-and-no-reverse-proxy/175285) 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:

```plaintext
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:

```plaintext
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?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [March 29, 2022, 8:11pm UTC](https://meta.discourse.org/t/loaderror-cannot-load-such-file-jobs-regular-export-csv-file/222425/2 "2022-03-29T20:11:07Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [March 29, 2022, 8:57pm UTC](https://meta.discourse.org/t/loaderror-cannot-load-such-file-jobs-regular-export-csv-file/222425/3 "2022-03-29T20:57:48Z")

</div>

> [@jimkleiber](#):
>
> `discourse-legal-tools`

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

---

<div class="post-metadata">

### Author: ![jimkleiber](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jimkleiber/32/121814_2.png) [@jimkleiber](https://meta.discourse.org/u/jimkleiber)
#### Post date: [March 29, 2022, 9:00pm UTC](https://meta.discourse.org/t/loaderror-cannot-load-such-file-jobs-regular-export-csv-file/222425/4 "2022-03-29T21:00:20Z")

</div>

> [@pfaffman](#):
>
> You can rebuild the web\_only without the new site?

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:

> [@Falco](#):
>
> You are running a third party plugin. Try rebuilding without it.

I’ve disabled the [Legal Tools Plugin](https://meta.discourse.org/t/legal-tools-plugin/87966) 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.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [March 30, 2022, 8:39am UTC](https://meta.discourse.org/t/loaderror-cannot-load-such-file-jobs-regular-export-csv-file/222425/5 "2022-03-30T08:39:35Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [April 29, 2022, 8:40am UTC](https://meta.discourse.org/t/loaderror-cannot-load-such-file-jobs-regular-export-csv-file/222425/6 "2022-04-29T08:40:06Z")

</div>

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