لقد أنشأت بعض الإضافات لـ Discourse وأضفت تبعية gem في plugin.rb على النحو التالي:
gem 'faraday-multipart', '1.1.0', require_name: 'faraday/multipart'
ثم أشرت إلى هذه الإضافة في app.yml وقمت بتنفيذ launcher rebuild app وتلقيت الخطأ التالي:
...
I, [2025-02-10T15:54:07.383295 #1] INFO -- : cd /var/www/discourse & su discourse -c 'bundle exec rake db:migrate'
rake aborted!
Gem::MissingSpecError: Could not find 'multipart-post' (~> 2.0) among 233 total gem(s) (Gem::MissingSpecError)
Checked in 'GEM_PATH=/var/www/discourse/vendor/bundle/ruby/3.3.0:/var/www/discourse/plugins/discourse-watermark/gems/3.3.6' at: /var/www/discourse/plugins/discourse-watermark/gems/3.3.6/specifications/faraday-multipart-1.1.0.gemspec, execute `gem env` for more information
/var/www/discourse/lib/plugin_gem.rb:25:in `load'
/var/www/discourse/lib/plugin/instance.rb:858:in `gem'
/var/www/discourse/plugins/discourse-watermark/plugin.rb:10:in `activate!'
/var/www/discourse/lib/plugin/instance.rb:801:in `instance_eval'
/var/www/discourse/lib/plugin/instance.rb:801:in `activate!'
/var/www/discourse/lib/discourse.rb:348:in `block in activate_plugins!'
/var/www/discourse/lib/discourse.rb:345:in `each'
/var/www/discourse/lib/discourse.rb:345:in `activate_plugins!'
/var/www/discourse/config/application.rb:233:in `block in <class:Application>'
/var/www/discourse/lib/plugin.rb:6:in `initialization_guard'
/var/www/discourse/config/application.rb:233: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.2.1/exe/rake:27:in `<top (required)>'
/usr/local/bin/bundle:25:in `load'
/usr/local/bin/bundle:25:in `<main>'
...
I, [2025-02-10T15:54:09.620121 #1] INFO -- : gem install faraday-multipart -v 1.1.0 -i /var/www/discourse/plugins/discourse-watermark/gems/3.3.6 --no-document --ignore-dependencies --no-user-install
Successfully installed faraday-multipart-1.1.0
1 gem installed
I, [2025-02-10T15:54:09.625734 #1] INFO -- : Terminating async processes
...
FAILED
...
لذلك، فشل الأمر في خطوة db:migrate، على الرغم من أن السجلات لاحقًا تشير إلى تثبيت gem faraday-multipart بنجاح. نظريتي هي أن db:migrate يتم تشغيله قبل تثبيت gem، ولكن ربما أفتقد شيئًا ما نظرًا لوجود الكثير من الإضافات في discourse مع تبعيات gem وهي تعمل بطريقة ما.