castwide / solargraph

A Ruby language server.
https://solargraph.org
MIT License
1.89k stars 158 forks source link

Cannot install: Forbidden 403 (https://api.rubygems.org/quick/Marshal.4.8/nokogiri-1.13.1-x64-unknown.gemspec.rz) #532

Closed phil294 closed 2 years ago

phil294 commented 2 years ago

This is my Dockerfile:

RUN apt-get update && apt-get install -y ruby-full
RUN gem install solargraph

This is the output:

RUN gem install solargraph
 ---> Running in 731699f1fb0a
Successfully installed backport-1.2.0
Successfully installed benchmark-0.2.0
Successfully installed bundler-2.3.6
Successfully installed diff-lcs-1.5.0
Successfully installed e2mmap-0.1.0
Building native extensions. This could take a while...
Successfully installed jaro_winkler-1.5.4
Successfully installed rexml-3.2.5
Successfully installed kramdown-2.3.1
Successfully installed kramdown-parser-gfm-1.1.0
Successfully installed ast-2.4.2
Successfully installed parser-3.1.0.0
Building native extensions. This could take a while...
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    bad response Forbidden 403 (https://api.rubygems.org/quick/Marshal.4.8/nokogiri-1.13.1-x64-unknown.gemspec.rz)
Successfully installed racc-1.6.0
The command '/bin/sh -c gem install solargraph' returned a non-zero code: 1

Any idea what's going on? I just wanted to program something in Ruby for once :(

castwide commented 2 years ago

It looks like the problem is the platform being identified as x64-unknown when trying to install nokogiri. Something like gem install nokogiri --platform=ruby might help. More info: https://nokogiri.org/tutorials/installing_nokogiri.html

phil294 commented 2 years ago

this did not help, the platform has consistently been detected as x64-unknown. No idea why. But you did point me into the right direction: I solved it with apt-get install -y ruby-nokogiri && gem install solargraph.

Thanks!

suyog-shimpi commented 2 years ago

I am facing same issue while installing - gem install solargraph

ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    bad response Forbidden 403 (https://api.rubygems.org/quick/Marshal.4.8/nokogiri-1.13.1-x64-unknown.gemspec.rz)

Current ruby version is - ruby-2.5.9