From 1dfceda42256ce433a2443f1e42eec2d4adbb2da Mon Sep 17 00:00:00 2001 From: Jacob Cody Wimer Date: Fri, 19 Apr 2019 11:19:11 -0400 Subject: [PATCH] --no-rdoc and --no-ri cannot be passed to gem install or bundle install in ruby 2.6 --- bin/run-tests-with-docker.sh | 2 +- deploy/rails-dev-Dockerfile | 5 +++-- deploy/rails-prod-Dockerfile | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/bin/run-tests-with-docker.sh b/bin/run-tests-with-docker.sh index abac17f..7dc0326 100644 --- a/bin/run-tests-with-docker.sh +++ b/bin/run-tests-with-docker.sh @@ -1,5 +1,5 @@ #!/bin/bash -e -project_dir="$(dirname $( dirname $(readlink -f ${BASH_SOURCE[0]})))" +project_dir="$(dirname $(readlink -f ${BASH_SOURCE[0]}))/.." docker build -f ${project_dir}/deploy/rails-prod-Dockerfile -t wrestlingdevtests ${project_dir}/. docker run -it wrestlingdevtests bash /rails/bin/run-all-tests.sh diff --git a/deploy/rails-dev-Dockerfile b/deploy/rails-dev-Dockerfile index d447b7b..799e5bf 100644 --- a/deploy/rails-dev-Dockerfile +++ b/deploy/rails-dev-Dockerfile @@ -16,10 +16,11 @@ RUN echo "America/New_York" > /etc/timezone \ && rm /etc/localtime \ && ln -s /usr/share/zoneinfo/America/New_York /etc/localtime -RUN gem install --no-rdoc --no-ri bundler +RUN echo 'gem: --no-rdoc --no-ri' > /root/.gemrc +RUN gem install bundler ADD Gemfile* /tmp/ WORKDIR /tmp -RUN bundle install --without production +RUN bundle install --jobs 4 --without production RUN mkdir /rails WORKDIR /rails diff --git a/deploy/rails-prod-Dockerfile b/deploy/rails-prod-Dockerfile index 35feb16..26f2740 100644 --- a/deploy/rails-prod-Dockerfile +++ b/deploy/rails-prod-Dockerfile @@ -24,13 +24,14 @@ RUN apt-get -qq update \ /tmp/* \ /var/tmp/* -RUN gem install --no-rdoc --no-ri bundler +RUN echo 'gem: --no-rdoc --no-ri' > /root/.gemrc +RUN gem install bundler #Cache gems so they don't install on every code change RUN rm -rf /rails && mkdir /rails WORKDIR /rails COPY Gemfile Gemfile COPY Gemfile.lock Gemfile.lock -RUN bundle install +RUN bundle install --jobs 4 # Copy site into place. ADD . /rails/