From 910dfec084ce87c0a75b2508b30a8a344904938e Mon Sep 17 00:00:00 2001 From: yuenmichelle1 Date: Mon, 22 Jan 2024 23:10:37 -0600 Subject: [PATCH 1/3] fix docker builds to run gem update system with gem-update pinned to specific version that is compatible with 2.7 --- Dockerfile | 4 ++++ Dockerfile.dev | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/Dockerfile b/Dockerfile index 29584e611..a42bc98c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,6 +31,10 @@ ADD ./Gemfile /rails_app/ ADD ./Gemfile.lock /rails_app/ RUN bundle config --global jobs `cat /proc/cpuinfo | grep processor | wc -l | xargs -I % expr % - 1` +# run gem update system so installation of mini_racer does not fail +# See: https://github.com/rubyjs/mini_racer/issues/289#issuecomment-1823077560 +# pinning gem update to 3.4.22 since anything higher requires updating Ruby version to 3+ +RUN gem i "rubygems-update:~>3.4.22" --no-document && update_rubygems RUN bundle install --without development test ADD ./ /rails_app diff --git a/Dockerfile.dev b/Dockerfile.dev index fa67743c9..f97a2334e 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -19,6 +19,10 @@ ADD ./Gemfile /rails_app/ ADD ./Gemfile.lock /rails_app/ RUN bundle config --global jobs `cat /proc/cpuinfo | grep processor | wc -l | xargs -I % expr % - 1` +# run gem update system so installation of mini_racer does not fail +# pinning gem update to 3.4.22 since anything higher requires updating Ruby version to 3+ +# https://github.com/rubyjs/mini_racer/issues/289#issuecomment-1823077560 +RUN gem i "rubygems-update:~>3.4.22" --no-document && update_rubygems RUN bundle install ADD ./ /rails_app From 0f48a893a7e463055ed24c728599c5f9e6d71556 Mon Sep 17 00:00:00 2001 From: yuenmichelle1 Date: Mon, 22 Jan 2024 23:12:11 -0600 Subject: [PATCH 2/3] update comments on why we pin gem-update and why updating system --- Dockerfile | 1 + Dockerfile.dev | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a42bc98c6..8646b0433 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,6 +31,7 @@ ADD ./Gemfile /rails_app/ ADD ./Gemfile.lock /rails_app/ RUN bundle config --global jobs `cat /proc/cpuinfo | grep processor | wc -l | xargs -I % expr % - 1` + # run gem update system so installation of mini_racer does not fail # See: https://github.com/rubyjs/mini_racer/issues/289#issuecomment-1823077560 # pinning gem update to 3.4.22 since anything higher requires updating Ruby version to 3+ diff --git a/Dockerfile.dev b/Dockerfile.dev index f97a2334e..70eb03280 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -19,9 +19,10 @@ ADD ./Gemfile /rails_app/ ADD ./Gemfile.lock /rails_app/ RUN bundle config --global jobs `cat /proc/cpuinfo | grep processor | wc -l | xargs -I % expr % - 1` + # run gem update system so installation of mini_racer does not fail -# pinning gem update to 3.4.22 since anything higher requires updating Ruby version to 3+ # https://github.com/rubyjs/mini_racer/issues/289#issuecomment-1823077560 +# pinning gem update to 3.4.22 since anything higher requires updating Ruby version to 3+ RUN gem i "rubygems-update:~>3.4.22" --no-document && update_rubygems RUN bundle install From 120985c0b081d27a0b0badce69201db6a5c0e2db Mon Sep 17 00:00:00 2001 From: yuenmichelle1 Date: Mon, 22 Jan 2024 23:32:44 -0600 Subject: [PATCH 3/3] update comment with troubleshooting docs from miniracer readme --- Dockerfile | 2 +- Dockerfile.dev | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8646b0433..4dfc865d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,7 +33,7 @@ ADD ./Gemfile.lock /rails_app/ RUN bundle config --global jobs `cat /proc/cpuinfo | grep processor | wc -l | xargs -I % expr % - 1` # run gem update system so installation of mini_racer does not fail -# See: https://github.com/rubyjs/mini_racer/issues/289#issuecomment-1823077560 +# See troubleshooting for mini_racer and supported ruby versions: https://github.com/rubyjs/mini_racer?tab=readme-ov-file#supported-ruby-versions--troubleshooting # pinning gem update to 3.4.22 since anything higher requires updating Ruby version to 3+ RUN gem i "rubygems-update:~>3.4.22" --no-document && update_rubygems RUN bundle install --without development test diff --git a/Dockerfile.dev b/Dockerfile.dev index 70eb03280..d9c7190ff 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -20,8 +20,8 @@ ADD ./Gemfile.lock /rails_app/ RUN bundle config --global jobs `cat /proc/cpuinfo | grep processor | wc -l | xargs -I % expr % - 1` -# run gem update system so installation of mini_racer does not fail -# https://github.com/rubyjs/mini_racer/issues/289#issuecomment-1823077560 +# run `gem update system` so installation of mini_racer does not fail +# See troubleshooting for mini_racer and supported ruby versions: https://github.com/rubyjs/mini_racer?tab=readme-ov-file#supported-ruby-versions--troubleshooting # pinning gem update to 3.4.22 since anything higher requires updating Ruby version to 3+ RUN gem i "rubygems-update:~>3.4.22" --no-document && update_rubygems RUN bundle install