21700: Narrow `bundle install` workaround options
authorBrett Smith <brett.smith@curii.com>
Mon, 22 Apr 2024 18:32:40 +0000 (14:32 -0400)
committerBrett Smith <brett.smith@curii.com>
Mon, 22 Apr 2024 18:32:40 +0000 (14:32 -0400)
This prevents `gem install` from resolving dependencies differently from
Bundler and creating its own set of problems.

Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith@curii.com>

build/rails-package-scripts/postinst.sh

index d0d5ef4408638701f8d086ea2eeb2278c8e2f96d..77bc08052ab0e0ae2926c67382c06784793cf31d 100644 (file)
@@ -210,7 +210,8 @@ configure_version() {
   # which are already installed system-wide, which causes bundle activation to
   # fail later. Work around this by installing all gems manually.
   find vendor/cache -maxdepth 1 -name '*.gem' -print0 \
-      | run_and_report "Installing bundle gems" xargs -0r gem install --quiet
+      | run_and_report "Installing bundle gems" xargs -0r \
+                       gem install --conservative --ignore-dependencies --local --quiet
   # The earlier `bundle config` should have it looking for installed gems in
   # the right place. Unset GEM_HOME now to be sure.
   unset GEM_HOME