# لا يمكن إعادة البناء باستخدام Discourse AI

**URL:** https://meta.discourse.org/t/cannot-rebuild-with-discourse-ai/315823
**Category:** Self-hosting
**Tags:** ai
**Created:** [10 يوليو 2024، 11:16م UTC](https://meta.discourse.org/t/cannot-rebuild-with-discourse-ai/315823 "2024-07-10T23:16:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![aas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/aas/32/289331_2.png) [@aas](https://meta.discourse.org/u/aas)
#### Post date: [10 يوليو 2024، 11:16م UTC](https://meta.discourse.org/t/cannot-rebuild-with-discourse-ai/315823/1 "2024-07-10T23:16:38Z")

</div>

حصلت على هذا الخطأ بعد تشغيل `./launcher rebuild app`

> **خطأ إعادة البناء**
>
> ```plaintext
> LoadError: لا يمكن تحميل الملف المطلوب -- tokenizers/tokenizers (LoadError)
> /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/bootsnap-1.17.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
> /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'
> /var/www/discourse/plugins/discourse-ai/gems/3.3.3/gems/tokenizers-0.4.2-x86_64-linux/lib/tokenizers.rb:5:in `rescue in <main>'
> /var/www/discourse/plugins/discourse-ai/gems/3.3.3/gems/tokenizers-0.4.2-x86_64-linux/lib/tokenizers.rb:2:in `<main>'
> /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/bootsnap-1.17.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
> /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'
> /var/www/discourse/lib/plugin_gem.rb:27:in `load'
> /var/www/discourse/lib/plugin/instance.rb:857:in `gem'
> /var/www/discourse/plugins/discourse-ai/plugin.rb:11:in `activate!'
> /var/www/discourse/lib/plugin/instance.rb:754:in `instance_eval'
> /var/www/discourse/lib/plugin/instance.rb:754:in `activate!'
> /var/www/discourse/lib/discourse.rb:347:in `block in activate_plugins!'
> /var/www/discourse/lib/discourse.rb:344:in `each'
> /var/www/discourse/lib/discourse.rb:344:in `activate_plugins!'
> /var/www/discourse/config/application.rb:227:in `block in <class:Application>'
> /var/www/discourse/lib/plugin.rb:6:in `initialization_guard'
> /var/www/discourse/config/application.rb:227:in `<class:Application>'
> /var/www/discourse/config/application.rb:75:in `<module:Discourse>'
> /var/www/discourse/config/application.rb:74:in `<top (required)>'
> /var/www/discourse/Rakefile:7:in `<top (required)>'
> /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/exe/rake:27:in `<top (required)>'
> /usr/local/bin/bundle:25:in `load'
> /usr/local/bin/bundle:25:in `<main>'
> 
> Caused by:
> LoadError: لا يمكن تحميل الملف المطلوب -- tokenizers/3.3/tokenizers (LoadError)
> /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/bootsnap-1.17.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:17:in `require'
> /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'
> /var/www/discourse/plugins/discourse-ai/gems/3.3.3/gems/tokenizers-0.4.2-x86_64-linux/lib/tokenizers.rb:3:in `<main>'
> /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/bootsnap-1.17.1/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
> /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/zeitwerk-2.6.12/lib/zeitwerk/kernel.rb:38:in `require'
> /var/www/discourse/lib/plugin_gem.rb:27:in `load'
> /var/www/discourse/lib/plugin/instance.rb:857:in `gem'
> /var/www/discourse/plugins/discourse-ai/plugin.rb:11:in `activate!'
> /var/www/discourse/lib/plugin/instance.rb:754:in `instance_eval'
> /var/www/discourse/lib/plugin/instance.rb:754:in `activate!'
> /var/www/discourse/lib/discourse.rb:347:in `block in activate_plugins!'
> /var/www/discourse/lib/discourse.rb:344:in `each'
> /var/www/discourse/lib/discourse.rb:344:in `activate_plugins!'
> /var/www/discourse/config/application.rb:227:in `block in <class:Application>'
> /var/www/discourse/lib/plugin.rb:6:in `initialization_guard'
> /var/www/discourse/config/application.rb:227:in `<class:Application>'
> /var/www/discourse/config/application.rb:75:in `<module:Discourse>'
> /var/www/discourse/config/application.rb:74:in `<top (required)>'
> /var/www/discourse/Rakefile:7:in `<top (required)>'
> /var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.1.0/exe/rake:27:in `<top (required)>'
> /usr/local/bin/bundle:25:in `load'
> /usr/local/bin/bundle:25:in `<main>'
> 
> (See full trace by running task with --trace)
> I, [2024-07-10T22:29:32.434732 #1] INFO -- : gem install tokenizers -v 0.4.2 -i /var/www/discourse/plugins/discourse-ai/gems/3.3.3 --no-document --ignore-dependencies --no-user-install
> Successfully installed tokenizers-0.4.2-x86_64-linux
> 1 gem installed
> 
> I, [2024-07-10T22:29:32.435444 #1] INFO -- : Terminating async processes
> I, [2024-07-10T22:29:32.435503 #1] INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid: 35
> I, [2024-07-10T22:29:32.435548 #1] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 97
> 2024-07-10 22:29:32.435 UTC [35] LOG: received fast shutdown request
> 97:signal-handler (1720650572) Received SIGTERM scheduling shutdown...
> 97:M 10 Jul 2024 22:29:32.440 # User requested shutdown...
> 97:M 10 Jul 2024 22:29:32.440 * Saving the final RDB snapshot before exiting.
> 2024-07-10 22:29:32.447 UTC [35] LOG: aborting any active transactions
> 2024-07-10 22:29:32.450 UTC [35] LOG: background worker "logical replication launcher" (PID 50) exited with exit code 1
> 2024-07-10 22:29:32.454 UTC [45] LOG: shutting down
> 2024-07-10 22:29:32.493 UTC [35] LOG: database system is shut down
> 97:M 10 Jul 2024 22:29:33.023 * DB saved on disk
> 97:M 10 Jul 2024 22:29:33.023 # Redis is now ready to exit, bye bye...
> 
> FAILED
> --------------------
> Pups::ExecError: cd /var/www/discourse &amp;&amp; su discourse -c 'bundle exec rake db:migrate' failed with return #<Process::Status: pid 1730 exit 1>
> Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
> exec failed with the params {"cd"=>"$home", "tag"=>"migrate", "hook"=>"db_migrate", "cmd"=>["su discourse -c 'bundle exec rake db:migrate'"]}
> bootstrap failed with exit code 1
> **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.
> 4589459187bba91d7a53346910788d1b5642eb105aa8fdee84377bdcbb5d86c5
> 
> ```

إزالة discourse-ai من قائمة الإضافات الخاصة بي يحل المشكلة.

اقترح @gpt4o_bot ما يلي، والذي لم أجربه لأنني لست متأكدًا مما إذا كان يجب علي ذلك:

> [@gpt4o\_bot](#):
>
> **تثبيت Gem يدويًا:**  
> حاول تثبيت Gem الذي به مشكلة يدويًا داخل الحاوية للتأكد من تثبيته بشكل صحيح.
> 
> ```plaintext
> ./launcher enter app
> gem install tokenizers -v 0.4.2
> exit
> ./launcher rebuild app
> 
> ```

---

<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: [1 أغسطس 2024، 4:12م UTC](https://meta.discourse.org/t/cannot-rebuild-with-discourse-ai/315823/2 "2024-08-01T16:12:37Z")

</div>

تم الحل على [Discourse AI Install Failing - #20 by Roman](https://meta.discourse.org/t/discourse-ai-install-failing/316334/20?u=falco)

---

<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: [1 أغسطس 2024، 4:12م UTC](https://meta.discourse.org/t/cannot-rebuild-with-discourse-ai/315823/3 "2024-08-01T16:12:40Z")

</div>


