Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

347
Views
No tiene permisos de escritura para el directorio /usr/lib/ruby/gems/2.7.0 (imagen de ventana acoplable de Alpine linux)

No puedo instalar las gemas de Ruby en la imagen de la ventana acoplable alpina. Probé diferentes enfoques de otras preguntas para resolver ERROR: While executing gem ... (Gem::FilePermissionError) , pero hay soluciones para Ubuntu o para Mac OS.

Parte del código del archivo docker:

 RUN set -ex \ && apk add --no-cache --update ruby ruby-dev ruby-bundler \ && gem install --no-document --source https://rubygems.org --version 3.6.6 inspec

PRODUCCIÓN:

 + apk add --no-cache --update ruby ruby-dev ruby-bundler fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz (1/11) Installing yaml (0.2.5-r0) (2/11) Installing ruby-libs (2.7.3-r1) (3/11) Installing ruby (2.7.3-r1) (4/11) Installing ruby-etc (2.7.3-r1) (5/11) Installing ruby-io-console (2.7.3-r1) (6/11) Installing ruby-bundler (2.2.20-r0) (7/11) Installing libgmpxx (6.2.1-r0) (8/11) Installing gmp-dev (6.2.1-r0) (9/11) Installing libucontext (1.1-r0) (10/11) Installing libucontext-dev (1.1-r0) (11/11) Installing ruby-dev (2.7.3-r1) Executing busybox-1.33.1-r2.trigger Executing glibc-bin-2.33-r0.trigger /usr/glibc-compat/sbin/ldconfig: /usr/glibc-compat/lib/ld-linux-x86-64.so.2 is not a symbolic link OK: 1409 MiB in 141 packages + gem install --no-document --source https://rubygems.org --version 3.6.6 inspec ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions for the /usr/lib/ruby/gems/2.7.0 directory. The command '/bin/sh -c set -ex && apk add --no-cache --update ruby ruby-dev ruby-bundler && gem install --no-document --source https://rubygems.org --version 3.6.6 inspec' returned a non-zero code: 1 ```
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Esto parece ser un problema con las versiones de Docker anteriores a la 20.10.4 y, al momento de escribir esto, DockerHub ejecuta una versión anterior.

Opción 1:

Si tiene control sobre la versión de su motor docker, actualícelo a la última versión (los comentarios sugieren al menos la versión 20.10.4 ).

Opcion 2:

Utilice FROM alpine:3.13 .

Con la última alpina ( 3.14 ) se rompe.

Opción 3:

Usa la imagen alpina oficial de Ruby. Probé con FROM ruby:3-alpine .

Referencias:

  • El problema se abrió en alpine/aports
  • La sección de notas de la versión correspondiente para alpine 3.14
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!