Works, thank you!
Hello @michaeld @RGJ, Iām not sure if this is the right place to ask, but Iām experiencing a similar issue with ffi when using the repository at https://github.com/communiteq/discourse-siwe-auth
as well as https://github.com/spruceid/discourse-siwe-auth
.
I, [2025-08-26T12:22:42.475531 #1] INFO -- :
I, [2025-08-26T12:22:42.475839 #1] INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
rake aborted!
Gem::LoadError: can't activate ffi-1.17.1-x86_64-linux-gnu, already activated ffi-1.17.2-x86_64-linux-gnu (Gem::LoadError)
/var/www/discourse/lib/plugin_gem.rb:25:in `load'
/var/www/discourse/lib/plugin/instance.rb:861:in `gem'
/var/www/discourse/plugins/discourse-siwe-auth/plugin.rb:23:in `activate!'
/var/www/discourse/lib/plugin/instance.rb:806:in `instance_eval'
/var/www/discourse/lib/plugin/instance.rb:806:in `activate!'
/var/www/discourse/lib/discourse.rb:344:in `block in activate_plugins!'
/var/www/discourse/lib/discourse.rb:341:in `each'
/var/www/discourse/lib/discourse.rb:341:in `activate_plugins!'
/var/www/discourse/config/application.rb:196:in `block in <class:Application>'
/var/www/discourse/lib/plugin.rb:6:in `initialization_guard'
/var/www/discourse/config/application.rb:196:in `<class:Application>'
/var/www/discourse/config/application.rb:62:in `<module:Discourse>'
/var/www/discourse/config/application.rb:61:in `<top (required)>'
/var/www/discourse/Rakefile:7:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/3.3.0/gems/rake-13.3.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)
Hook section of my discourse self-hosted app:
hooks:
before_code:
- exec:
cmd:
- gem install rubyzip
after_code:
- exec:
cd: $home/plugins
cmd:
- git clone https://github.com/discourse/docker_manager.git
- git clone https://github.com/communiteq/discourse-siwe-auth.git
- git clone https://github.com/discourse/discourse-code-review.git
For now, Iām going to try forking your repository and bumping the version, as I have a deadline to migrate this Discourse instance. I just wanted to let you know about this.
Also, Iād like to know if the plugin is actively maintained by Communiteq.
Thanks in advance!
Without looking at the codeā¦
Could the problem be that ffi is now in core and your donāt need to add it?
Iām not really into Ruby so I canāt make an statement about the plugin but I can confirm that bumping the ffi to 1.17.2 in the forked repository works like a charm, and with bumping I mean changing the plugin.rb
with:
gem 'ffi', '1.17.2', require: false
That worked for me but Iād really like to use the official maintained plugin instead of my own fork.
My suggestion was to remove the gem altogether. And when that works, submit a PR with that line removed.
Weāre more like passively maintaining it. The official repository is in spruceid
, but since we run a number of sites using the plugin, in practice itās us who fix it first. This time you beat us to it, it is still on our list of plugins to change for 3.5.
If no one makes a PR to the official repo, I will get to this by the end of this week or the beginning of next week.
I would prefer to leave the task of opening the PR to you, as you probably have considerations or tests regarding the plugin that I am unaware of, since I know very little about this service as I am in the process of migrating it.
Thank you for your help, information, and contributions on this topic.
I have fixed the plugin - it indeed was only a matter of removing the explicit ffi
gem inclusion.
I have also made a pull request to the original repository. As long as the PR has not been accepted, you can use https://github.com/communiteq/discourse-siwe-auth
instead of the original repository.
I will change the link in the OP to this for the time being as well.