spruceid / discourse-siwe-auth

Discourse plugin for SIWE authentication
Other
34 stars 17 forks source link

Cannot Install Plugin on Self-Hosted Discourse server - rbsecp256k1 #15

Closed Sterahi closed 2 years ago

Sterahi commented 2 years ago

Using the latest docker image from Discourse we're seeing the error:

I, [2022-05-20T16:58:42.288275 #1]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'
ERROR:  Error installing rbsecp256k1:
    ERROR: Failed to build gem native extension.

    current directory: /var/www/discourse/plugins/discourse-siwe-auth/gems/2.7.6/gems/rbsecp256k1-5.1.0/ext/rbsecp256k1
/usr/local/bin/ruby -I /usr/local/lib/ruby/site_ruby/2.7.0 -r ./siteconf20220520-1530-cv5chg.rb extconf.rb
Downloading libsecp256k1.zip (100%)

Even after installing the required system-level dependencies of rbsecp256k1 our discourse server will not start. Our app.yml looks like:

hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/spruceid/discourse-siwe-auth.git

Any assistance would be appreciated!

Sterahi commented 2 years ago

Just an update, after re-testing today I can confirm that the changes made here did not resolve the issue we're having.

obstropolos commented 2 years ago

Just an update, after re-testing today I can confirm that the changes made here did not resolve the issue we're having.

Thanks for the heads up - we're looking into this.

miguelmota commented 2 years ago

Hi, is there any update on this issue?

DeepinScreenshot_select-area_20220613213153

burningtree commented 2 years ago

I have the same problem:

ERROR:  Error installing rbsecp256k1:
    ERROR: Failed to build gem native extension.

Im using:

zashton commented 2 years ago

Just an update, after re-testing today I can confirm that the changes made here did not resolve the issue we're having.

Thanks for the heads up - we're looking into this.

any luck on this issue ? trying for the first time & couldn't install the plugin at all

obstropolos commented 2 years ago

Still trying to find the root cause here, thanks again for your patience all -

communiteq commented 2 years ago

All you need to do is add the before_codelines to app.yml to make sure the rubyzip gem is installed. I don't know how to fix this within the plugin though.

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/spruceid/discourse-siwe-auth
w4ll3 commented 2 years ago

@Sterahi Sorry for the delay on this. I can confirm that the solution above solves the issue (at least did for me), could you give it a try and confirm that solves for you as well?

@communiteq Thanks for your contribution.

obstropolos commented 2 years ago

All you need to do is add the before_codelines to app.yml to make sure the rubyzip gem is installed. I don't know how to fix this within the plugin though.

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/spruceid/discourse-siwe-auth

Echoing @w4ll3 - thanks for the contribution here. We'll update the documentation to reflect these changes [#17] and we'll close the issue out once we have some confirmation from other folks affected.

I just rebuilt a fresh discourse instance on a new server using this fix and it all worked.

miguelmota commented 2 years ago

The suggestion by @communiteq worked great on an existing instance!

obstropolos commented 2 years ago

Closing this issue for now with the latest suggestion and changes.

Will reopen if persists with projects.

Sterahi commented 2 years ago

Apologies for the delay,

The above resolved my installation problem. Thanks!