From d590b0ebc4dc42f22f3fa53efbac7f7ece1011ce Mon Sep 17 00:00:00 2001 From: Vishnu Narayanan Date: Wed, 23 Feb 2022 23:27:19 +0530 Subject: [PATCH] fix: nokogiri gem build failure in docker (#4060) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tar (child): xz: Cannot exec: No such file or directory¶ Starting in v1.13.2, the source archive used for libxml2 and libxslt is compressed with xz (previous versions were compressed with gzip. As a result, when compiling from source, your system will need to have xz installed in order to extract the source code for these libraries. --- docker/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index e51a86379..64c49b324 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -35,7 +35,9 @@ COPY Gemfile Gemfile.lock ./ # natively compile grpc and protobuf to support alpine musl (dialogflow-docker workflow) # https://github.com/googleapis/google-cloud-ruby/issues/13306 -RUN apk add --no-cache musl ruby-full ruby-dev gcc make musl-dev openssl openssl-dev g++ linux-headers +# adding xz as nokogiri was failing to build libxml +# https://github.com/chatwoot/chatwoot/issues/4045 +RUN apk add --no-cache musl ruby-full ruby-dev gcc make musl-dev openssl openssl-dev g++ linux-headers xz RUN bundle config set --local force_ruby_platform true # Do not install development or test gems in production