21583: Configure Passenger with passenger_preload_bundler
authorBrett Smith <brett.smith@curii.com>
Fri, 5 Apr 2024 19:06:12 +0000 (15:06 -0400)
committerBrett Smith <brett.smith@curii.com>
Thu, 18 Apr 2024 15:49:25 +0000 (11:49 -0400)
This helps avoid situations where Passenger loads gems that create
a conflict with our bundle. We're currently seeing this with the base64
gem, where Passenger on Ruby 3.[0-3] can load the version shipped with
that Ruby before our RailsAPI bundle gets loaded. This causes an error:

  [ E 2024-03-12 15:12:44.8347 907382/Tf age/Cor/App/Implementation.cpp:221 ]:
  Could not spawn process for application /var/www/arvados-api/current:
  The application encountered the following error: You have already
  activated base64 0.1.1, but your Gemfile requires base64 0.2.0. Since
  base64 is a default gem, you can either remove your dependency on it or
  try updating to a newer version of bundler that supports base64 as a
  default gem. (Gem::LoadError)

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

doc/admin/config-urls.html.textile.liquid
doc/install/install-api-server.html.textile.liquid
tools/salt-install/config_examples/multi_host/aws/pillars/nginx_api_configuration.sls
tools/salt-install/config_examples/single_host/multiple_hostnames/pillars/nginx_api_configuration.sls
tools/salt-install/config_examples/single_host/single_hostname/pillars/nginx_api_configuration.sls
tools/salt-install/config_examples/single_host/single_hostname/pillars/nginx_workbench_configuration.sls

index 3cf6e79722a4ae03b9f55b4b6fd8fd891fc34c03..7c998061fe20d7ae252e7463c39d87d641251ae8 100644 (file)
@@ -174,6 +174,7 @@ server {
   index  index.html index.htm index.php;
 
   passenger_enabled on;
+  passenger_preload_bundler on;
 
   # If you are using RVM, uncomment the line below.
   # If you're using system ruby, leave it commented out.
index d1d14781805bdc3ecc28cdc0815d74e646ecba68..8e4f347d49eed47acd51b18a3dcf617734290341 100644 (file)
@@ -178,6 +178,7 @@ server {
   index  index.html index.htm index.php;
 
   passenger_enabled on;
+  passenger_preload_bundler on;
 
   # <span class="userinput">If you are using RVM, uncomment the line below.</span>
   # <span class="userinput">If you're using system ruby, leave it commented out.</span>
index bfe0386e9316fe848bccf5e775d452c1462e653c..d27552f6fbecada020d4d9aac8d093d567b32b59 100644 (file)
@@ -25,4 +25,5 @@ nginx:
             - access_log: /var/log/nginx/api.__DOMAIN__-upstream.access.log combined
             - error_log: /var/log/nginx/api.__DOMAIN__-upstream.error.log
             - passenger_enabled: 'on'
+            - passenger_preload_bundler: 'on'
             - client_max_body_size: 128m
index 54087f6d6d0fe43ae9c1a12e71ac2604935a2635..b567af90d7fbff5bf6be71d2c8a6e9c4b84fb95c 100644 (file)
@@ -31,4 +31,5 @@ nginx:
             - access_log: /var/log/nginx/api.__CLUSTER__.__DOMAIN__-upstream.access.log combined
             - error_log: /var/log/nginx/api.__CLUSTER__.__DOMAIN__-upstream.error.log
             - passenger_enabled: 'on'
+            - passenger_preload_bundler: 'on'
             - client_max_body_size: 128m
index 04195ae5b9b23e25f21ad1703b66c4a2116cfb21..3bf7bf54abbbff0e04c4a64849136f17bcca9de8 100644 (file)
@@ -31,4 +31,5 @@ nginx:
             - access_log: /var/log/nginx/api.__CLUSTER__.__DOMAIN__-upstream.access.log combined
             - error_log: /var/log/nginx/api.__CLUSTER__.__DOMAIN__-upstream.error.log
             - passenger_enabled: 'on'
+            - passenger_preload_bundler: 'on'
             - client_max_body_size: 128m
index 59fb43e57af40d70736dc27822c304bdce76f1c6..5d5d0af6684c272d296f2143045f22d196337880 100644 (file)
@@ -78,6 +78,7 @@ nginx:
             - root: /var/www/arvados-workbench/current/public
             - index:  index.html index.htm
             - passenger_enabled: 'on'
+            - passenger_preload_bundler: 'on'
             # yamllint disable-line rule:line-length
             - access_log: /var/log/nginx/workbench.__CLUSTER__.__DOMAIN__-upstream.access.log combined
             - error_log: /var/log/nginx/workbench.__CLUSTER__.__DOMAIN__-upstream.error.log