Hello! I’m developing a plugin to enable Sign-In with Ethereum on Discourse. The problem is that when installing the plugin I get an error with one of the dependencies (rbsecp256k1).
ERROR: Error installing rbsecp256k1:
ERROR: Failed to build gem native extension.
current directory: /var/www/discourse/plugins/sdp/gems/2.7.5/gems/rbsecp256k1-5.1.0/ext/rbsecp256k1
/usr/local/bin/ruby -I /usr/local/lib/ruby/site_ruby/2.7.0 -r ./siteconf20220303-1234-gyqjb.rb extconf.rb
extconf.rb:3:in `require': cannot load such file -- mini_portile2 (LoadError)
from extconf.rb:3:in `<main>'
extconf failed, exit code 1
I wonder what might be happening since it works on development if I manually install the dependencies.
I mean, I can but the problem is not with that gem the problem is with rbsecp256k1, when it tries to build it doesn’t find the mini_portile2 gem (As the error says: cannot load such file -- mini_portile2 (LoadError) from extconf.rb:3:in <main>'
His solution works, but I don’t consider that a valid option, no user would be willing to do all of that just to add a plugin. I just wanted to know if someone could think of a better approach (the closest to just add the repo and you’re good to go). as @fzngagan himself said:
I would love it if there was a more straightfwd solution.
I’ve been narrowing it down, it doesn’t seem related to the gems, it seems to be related to extconf.rb. I tried with other few gems with a more complex setup (ruby-magic and libusb), both doesn’t work (for different reason) all they have in common are dependencies at extconf.rb.