Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error installing rubygems-update: rubygems-update requires Ruby version >= 3.0.0. #528

Open
jozefizso opened this issue Feb 25, 2024 · 1 comment

Comments

@jozefizso
Copy link

The make server does not work on current main branch:

RUN gem update --system:
10.69 ERROR:  Error installing rubygems-update:
10.69   rubygems-update requires Ruby version >= 3.0.0.
10.69 ERROR:  While executing gem ... (NoMethodError)
10.69     undefined method `version' for nil:NilClass

Full logs:

make serve
cd certs && make test O=sets/test D=badssl.test
make[1]: Entering directory '/home/jozef/badssl.com/certs'
make[1]: Nothing to be done for 'test'.
make[1]: Leaving directory '/home/jozef/badssl.com/certs'
cd certs/sets && rm -rf current && cp -R test current
rm -rf common/certs/*.crt
cp certs/sets/current/gen/crt/ca-root.crt common/certs
cp certs/sets/current/gen/crt/ca-untrusted-root.crt common/certs
cp certs/sets/current/gen/crt/client.p12 common/certs/badssl.test-client.p12
cp certs/sets/current/gen/crt/client.pem common/certs/badssl.test-client.pem
docker build -t badssl .
[+] Building 12.0s (10/14)                                                                                                                                                                                            docker:default
 => [internal] load build definition from Dockerfile                                                                                                                                                                            0.0s
 => => transferring dockerfile: 703B                                                                                                                                                                                            0.0s
 => [internal] load metadata for docker.io/library/ubuntu:16.04                                                                                                                                                                 1.1s
 => [internal] load .dockerignore                                                                                                                                                                                               0.0s
 => => transferring context: 2B                                                                                                                                                                                                 0.0s
 => [ 1/10] FROM docker.io/library/ubuntu:16.04@sha256:1f1a2d56de1d604801a9671f301190704c25d604a416f59e03c04f5c6ffee0d6                                                                                                         0.0s
 => [internal] load build context                                                                                                                                                                                               0.1s
 => => transferring context: 1.36MB                                                                                                                                                                                             0.0s
 => CACHED [ 2/10] RUN apt-get update && apt-get install -y apt-transport-https                                                                                                                                                 0.0s
 => CACHED [ 3/10] RUN apt-get install -y software-properties-common                                                                                                                                                            0.0s
 => CACHED [ 4/10] RUN apt-add-repository ppa:brightbox/ruby-ng                                                                                                                                                                 0.0s
 => CACHED [ 5/10] RUN apt-get update && apt-get install -y     build-essential     git     libffi-dev     make     nginx     ruby2.4     ruby2.4-dev                                                                           0.0s
 => ERROR [ 6/10] RUN gem update --system                                                                                                                                                                                      10.8s
------
 > [ 6/10] RUN gem update --system:
10.69 ERROR:  Error installing rubygems-update:
10.69   rubygems-update requires Ruby version >= 3.0.0.
10.69 ERROR:  While executing gem ... (NoMethodError)
10.69     undefined method `version' for nil:NilClass
10.72 Updating rubygems-update
------
Dockerfile:16
--------------------
  14 |         ruby2.4 \
  15 |         ruby2.4-dev
  16 | >>> RUN gem update --system
  17 |     RUN gem install jekyll
  18 |
--------------------
ERROR: failed to solve: process "/bin/sh -c gem update --system" did not complete successfully: exit code: 1
make: *** [Makefile:99: docker-build] Error 1
@rcanavan
Copy link

rubygems-update requires Ruby version >= 3.0.0. refers to rubygems-update version 3.5 and newer, which appears to be the default version. You can workaround this by explicitly specifying a version of rubygems-update that still supports the ruby 2.4 used in this image by patching the Dockerfile. I think the latest you can use is 3.3.27 (https://github.com/rubygems/rubygems/releases/tag/v3.3.27).

-RUN gem update --system
+RUN gem update --system 3.3.27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants