GoogleCloudPlatform / buildpacks

Builders and buildpacks designed to run on Google Cloud's container platforms
Apache License 2.0
991 stars 147 forks source link

Building a Rails application fails because NodeJS isn't installed #257

Closed clupprich closed 1 year ago

clupprich commented 1 year ago

I was trying to build a Rails 7 application (with jsbundling-rails installed). While yarn is correctly installed, it fails because there's no version of NodeJS installed:

Running "bundle exec ruby bin/rails assets:precompile (RAILS_ENV=production MALLOC_ARENA_MAX=2 RAILS_LOG_TO_STDOUT=true LANG=C.utf8)"
Yarn requires Node.js 4.0 or higher to be installed.
rails aborted!
jsbundling-rails: Command build failed, ensure yarn is installed and `yarn build` runs without errors

Tasks: TOP => assets:precompile => javascript:build
(See full trace by running task with --trace)
Done "bundle exec ruby bin/rails assets:precompile (RAILS_ENV=prod..." (7.927465337s)
WARNING: Asset precompilation returned non-zero exit code 1. Ignoring.

Here's the complete output of a pack build -v (note that I'm using a custom builder image because of packages needed for building the pg and openssl gems):

Builder eu.gcr.io/shopify-indigo/google-builder-rails is untrusted
As a result, the phases of the lifecycle which require root access will be run in separate trusted ephemeral containers.
For more information, see https://medium.com/buildpacks/faster-more-secure-builds-with-pack-0-11-0-4d0c633ca619
Pulling image eu.gcr.io/shopify-indigo/google-builder-rails:latest
Selected run image gcr.io/buildpacks/gcp/run:v1
Pulling image gcr.io/buildpacks/gcp/run:v1
v1: Pulling from buildpacks/gcp/run
Digest: sha256:ea9b5b1e0fd5680b20b44323155c4648650768424a2194a7671807c86e6dc8b0
Status: Image is up to date for gcr.io/buildpacks/gcp/run:v1
Creating builder with the following buildpacks:
-> google.config.entrypoint@0.9.0
-> google.cpp.clear_source@0.1.0
-> google.cpp.functions-framework@0.1.0
-> google.dart.compile@1.0.0
-> google.dart.pub@0.1.0
-> google.dart.sdk@1.0.0
-> google.dotnet.runtime@0.9.1
-> google.dotnet.sdk@0.9.1
-> google.dotnet.publish@0.9.0
-> google.dotnet.functions-framework@0.0.1
-> google.go.clear_source@0.9.0
-> google.go.runtime@0.9.1
-> google.go.gomod@0.9.0
-> google.go.build@0.9.0
-> google.go.gopath@0.9.0
-> google.go.functions-framework@0.9.4
-> google.java.entrypoint@0.9.0
-> google.java.exploded-jar@0.9.0
-> google.java.functions-framework@1.1.0
-> google.java.gradle@0.9.0
-> google.java.maven@0.9.0
-> google.java.graalvm@0.1.0
-> google.java.native-image@0.1.0
-> google.java.runtime@0.9.1
-> google.java.clear_source@0.9.0
-> google.nodejs.runtime@1.0.0
-> google.nodejs.npm@1.0.0
-> google.nodejs.yarn@2.1.0
-> google.nodejs.functions-framework@0.9.4
-> google.python.runtime@0.9.1
-> google.python.pip@0.9.2
-> google.python.functions-framework@0.9.6
-> google.python.missing-entrypoint@0.9.0
-> google.utils.label@0.0.2
-> google.ruby.runtime@0.0.1
-> google.ruby.rubygems@0.9.0
-> google.ruby.bundle@0.9.0
-> google.ruby.rails@0.9.0
-> google.ruby.missing-entrypoint@0.0.1
-> google.config.flex@0.9.1
-> google.python.webserver@0.9.1
-> google.php.composer@0.9.1
-> google.php.composer-install@0.0.1
-> google.php.runtime@0.0.1
-> google.php.webconfig@0.0.1
-> google.utils.nginx@0.0.1
Pulling image buildpacksio/lifecycle:0.15.1
0.15.1: Pulling from buildpacksio/lifecycle
Digest: sha256:a8df5457f121fcdda920cb0dfd15717530ec37334f8b088144d94e182ada6db8
Status: Image is up to date for buildpacksio/lifecycle:0.15.1
Using build cache volume pack-cache-library_shopify-indigo_latest-9a6e9f9acd6a.build
===> ANALYZING
Running the analyzer on OS linux with:
Container Settings:
  Args: /cnb/lifecycle/analyzer -log-level debug -daemon -stack /layers/stack.toml -run-image gcr.io/buildpacks/gcp/run:v1 -launch-cache /launch-cache shopify-indigo
  System Envs: CNB_USER_ID=1000 CNB_GROUP_ID=1000 CNB_PLATFORM_API=0.10
  Image: buildpacksio/lifecycle:0.15.1
  User: root
  Labels: map[author:pack]
Host Settings:
  Binds: /var/run/docker.sock:/var/run/docker.sock pack-cache-library_shopify-indigo_latest-9a6e9f9acd6a.launch:/launch-cache pack-layers-gioytuatgw:/layers pack-app-imxwcfkuew:/workspace
  Network Mode:
[analyzer] Analyzing image "232cc96703c8ac94f4a5fb70a27ef27edb5603df491cfc1ac2bfebb84278460f"
[analyzer] Restoring data for SBOM from previous image
[analyzer] Retrieving previous image SBOM layer for "sha256:827a40f10c0787f7ae4545cf3bc11c131311fae52e2039e17b3ff14e41c7936d"
[analyzer] Analyzing image "64d105639de9a80510a6a4231ebc51c7cbc9da4b4f73343f1caa7e411a4bbb81"
===> DETECTING
Running the detector on OS linux with:
Container Settings:
  Args: /cnb/lifecycle/detector -app /workspace -log-level debug
  System Envs: CNB_PLATFORM_API=0.10
  Image: pack.local/builder/7a6772676f766d747378:latest
  User:
  Labels: map[author:pack]
Host Settings:
  Binds: pack-layers-gioytuatgw:/layers pack-app-imxwcfkuew:/workspace
  Network Mode:
[detector] ======== Output: google.dotnet.sdk@0.9.1 ========
[detector] Opting out: no project files or .dll files found
[detector] ======== Output: google.dotnet.functions-framework@0.0.1 ========
[detector] Opting out: GOOGLE_FUNCTION_TARGET not set
[detector] ======== Output: google.dotnet.publish@0.9.0 ========
[detector] Opting out: no project files found and GOOGLE_BUILDABLE not set
[detector] ======== Output: google.dotnet.runtime@0.9.1 ========
[detector] Opting out: no project files or .dll files found
[detector] ======== Output: google.config.entrypoint@0.9.0 ========
[detector] Opting in: found Procfile
[detector] ======== Output: google.utils.label@0.0.2 ========
[detector] Opting in: always enabled
[detector] ======== Results ========
[detector] fail: google.dotnet.sdk@0.9.1
[detector] skip: google.dotnet.functions-framework@0.0.1
[detector] fail: google.dotnet.publish@0.9.0
[detector] fail: google.dotnet.runtime@0.9.1
[detector] pass: google.config.entrypoint@0.9.0
[detector] pass: google.utils.label@0.0.2
[detector] ======== Output: google.dotnet.runtime@0.9.1 ========
[detector] Opting out: no project files or .dll files found
[detector] ======== Output: google.config.entrypoint@0.9.0 ========
[detector] Opting in: found Procfile
[detector] ======== Output: google.utils.label@0.0.2 ========
[detector] Opting in: always enabled
[detector] ======== Results ========
[detector] fail: google.dotnet.runtime@0.9.1
[detector] pass: google.config.entrypoint@0.9.0
[detector] pass: google.utils.label@0.0.2
[detector] ======== Output: google.dart.sdk@1.0.0 ========
[detector] Opting out: neither pubspec.yaml nor any .dart files found
[detector] ======== Output: google.dart.pub@0.1.0 ========
[detector] Opting out: pubspec.yaml not found
[detector] ======== Output: google.dart.compile@1.0.0 ========
[detector] Opting out: no .dart files found
[detector] ======== Results ========
[detector] fail: google.dart.sdk@1.0.0
[detector] skip: google.dart.pub@0.1.0
[detector] fail: google.dart.compile@1.0.0
[detector] ======== Output: google.go.runtime@0.9.1 ========
[detector] Opting out: no .go files found
[detector] ======== Output: google.go.functions-framework@0.9.4 ========
[detector] Opting out: GOOGLE_FUNCTION_TARGET not set
[detector] ======== Output: google.go.build@0.9.0 ========
[detector] Opting out: no .go files found
[detector] ======== Output: google.config.entrypoint@0.9.0 ========
[detector] Opting in: found Procfile
[detector] ======== Output: google.go.clear_source@0.9.0 ========
[detector] Opting out: GOOGLE_CLEAR_SOURCE not set
[detector] ======== Output: google.utils.label@0.0.2 ========
[detector] Opting in: always enabled
[detector] ======== Results ========
[detector] fail: google.go.runtime@0.9.1
[detector] fail: google.go.functions-framework@0.9.4
[detector] fail: google.go.build@0.9.0
[detector] pass: google.config.entrypoint@0.9.0
[detector] skip: google.go.clear_source@0.9.0
[detector] pass: google.utils.label@0.0.2
[detector] ======== Output: google.go.runtime@0.9.1 ========
[detector] Opting out: no .go files found
[detector] ======== Output: google.go.gomod@0.9.0 ========
[detector] Opting out: go.mod not found
[detector] ======== Output: google.go.build@0.9.0 ========
[detector] Opting out: no .go files found
[detector] ======== Output: google.config.entrypoint@0.9.0 ========
[detector] Opting in: found Procfile
[detector] ======== Output: google.go.clear_source@0.9.0 ========
[detector] Opting out: GOOGLE_CLEAR_SOURCE not set
[detector] ======== Output: google.utils.label@0.0.2 ========
[detector] Opting in: always enabled
[detector] ======== Results ========
[detector] fail: google.go.runtime@0.9.1
[detector] fail: google.go.gomod@0.9.0
[detector] fail: google.go.build@0.9.0
[detector] pass: google.config.entrypoint@0.9.0
[detector] skip: google.go.clear_source@0.9.0
[detector] pass: google.utils.label@0.0.2
[detector] ======== Output: google.go.runtime@0.9.1 ========
[detector] Opting out: no .go files found
[detector] ======== Output: google.go.gopath@0.9.0 ========
[detector] Opting in: go.mod file not found, assuming GOPATH build
[detector] ======== Output: google.go.build@0.9.0 ========
[detector] Opting out: no .go files found
[detector] ======== Output: google.config.entrypoint@0.9.0 ========
[detector] Opting in: found Procfile
[detector] ======== Output: google.go.clear_source@0.9.0 ========
[detector] Opting out: GOOGLE_CLEAR_SOURCE not set
[detector] ======== Output: google.utils.label@0.0.2 ========
[detector] Opting in: always enabled
[detector] ======== Results ========
[detector] fail: google.go.runtime@0.9.1
[detector] pass: google.go.gopath@0.9.0
[detector] fail: google.go.build@0.9.0
[detector] pass: google.config.entrypoint@0.9.0
[detector] skip: google.go.clear_source@0.9.0
[detector] pass: google.utils.label@0.0.2
[detector] ======== Output: google.java.graalvm@0.1.0 ========
[detector] Opting out: GOOGLE_JAVA_USE_NATIVE_IMAGE not set
[detector] ======== Output: google.java.maven@0.9.0 ========
[detector] Opting out: none of the following found: pom.xml or .mvn/extensions.xml.
[detector] ======== Output: google.java.functions-framework@1.1.0 ========
[detector] Opting out: GOOGLE_FUNCTION_TARGET not set
[detector] ======== Output: google.java.native-image@0.1.0 ========
[detector] Opting in: always enabled
[detector] ======== Output: google.config.entrypoint@0.9.0 ========
[detector] Opting in: found Procfile
[detector] ======== Output: google.java.clear_source@0.9.0 ========
[detector] Opting out: GOOGLE_CLEAR_SOURCE not set
[detector] ======== Output: google.utils.label@0.0.2 ========
[detector] Opting in: always enabled
[detector] ======== Results ========
[detector] fail: google.java.graalvm@0.1.0
[detector] fail: google.java.maven@0.9.0
[detector] skip: google.java.functions-framework@1.1.0
[detector] pass: google.java.native-image@0.1.0
[detector] pass: google.config.entrypoint@0.9.0
[detector] skip: google.java.clear_source@0.9.0
[detector] pass: google.utils.label@0.0.2
[detector] ======== Output: google.java.runtime@0.9.1 ========
[detector] Opting out: none of the following found: pom.xml, .mvn/extensions.xml, build.gradle, build.gradle.kts, META-INF/MANIFEST.MF, *.java, *.jar
[detector] ======== Output: google.java.maven@0.9.0 ========
[detector] Opting out: none of the following found: pom.xml or .mvn/extensions.xml.
[detector] ======== Output: google.java.functions-framework@1.1.0 ========
[detector] Opting out: GOOGLE_FUNCTION_TARGET not set
[detector] ======== Output: google.java.clear_source@0.9.0 ========
[detector] Opting out: GOOGLE_CLEAR_SOURCE not set
[detector] ======== Output: google.utils.label@0.0.2 ========
[detector] Opting in: always enabled
[detector] ======== Results ========
[detector] fail: google.java.runtime@0.9.1
[detector] fail: google.java.maven@0.9.0
[detector] fail: google.java.functions-framework@1.1.0
[detector] skip: google.java.clear_source@0.9.0
[detector] pass: google.utils.label@0.0.2
[detector] ======== Output: google.java.runtime@0.9.1 ========
[detector] Opting out: none of the following found: pom.xml, .mvn/extensions.xml, build.gradle, build.gradle.kts, META-INF/MANIFEST.MF, *.java, *.jar
[detector] ======== Output: google.java.gradle@0.9.0 ========
[detector] Opting out: neither build.gradle nor build.gradle.kts found
[detector] ======== Output: google.java.functions-framework@1.1.0 ========
[detector] Opting out: GOOGLE_FUNCTION_TARGET not set
[detector] ======== Output: google.java.clear_source@0.9.0 ========
[detector] Opting out: GOOGLE_CLEAR_SOURCE not set
[detector] ======== Output: google.utils.label@0.0.2 ========
[detector] Opting in: always enabled
[detector] ======== Results ========
[detector] fail: google.java.runtime@0.9.1
[detector] skip: google.java.gradle@0.9.0
[detector] fail: google.java.functions-framework@1.1.0
[detector] skip: google.java.clear_source@0.9.0
[detector] pass: google.utils.label@0.0.2
[detector] ======== Output: google.java.runtime@0.9.1 ========
[detector] Opting out: none of the following found: pom.xml, .mvn/extensions.xml, build.gradle, build.gradle.kts, META-INF/MANIFEST.MF, *.java, *.jar
[detector] ======== Output: google.java.exploded-jar@0.9.0 ========
[detector] Opting out: META-INF/MANIFEST.MF not found
[detector] ======== Output: google.utils.label@0.0.2 ========
[detector] Opting in: always enabled
[detector] ======== Results ========
[detector] fail: google.java.runtime@0.9.1
[detector] fail: google.java.exploded-jar@0.9.0
[detector] pass: google.utils.label@0.0.2
[detector] ======== Output: google.java.runtime@0.9.1 ========
[detector] Opting out: none of the following found: pom.xml, .mvn/extensions.xml, build.gradle, build.gradle.kts, META-INF/MANIFEST.MF, *.java, *.jar
[detector] ======== Output: google.java.maven@0.9.0 ========
[detector] Opting out: none of the following found: pom.xml or .mvn/extensions.xml.
[detector] ======== Output: google.config.entrypoint@0.9.0 ========
[detector] Opting in: found Procfile
[detector] ======== Output: google.java.clear_source@0.9.0 ========
[detector] Opting out: GOOGLE_CLEAR_SOURCE not set
[detector] ======== Output: google.utils.label@0.0.2 ========
[detector] Opting in: always enabled
[detector] ======== Results ========
[detector] fail: google.java.runtime@0.9.1
[detector] fail: google.java.maven@0.9.0
[detector] pass: google.config.entrypoint@0.9.0
[detector] skip: google.java.clear_source@0.9.0
[detector] pass: google.utils.label@0.0.2
[detector] ======== Output: google.java.runtime@0.9.1 ========
[detector] Opting out: none of the following found: pom.xml, .mvn/extensions.xml, build.gradle, build.gradle.kts, META-INF/MANIFEST.MF, *.java, *.jar
[detector] ======== Output: google.java.maven@0.9.0 ========
[detector] Opting out: none of the following found: pom.xml or .mvn/extensions.xml.
[detector] ======== Output: google.java.entrypoint@0.9.0 ========
[detector] Opting in: always enabled
[detector] ======== Output: google.java.clear_source@0.9.0 ========
[detector] Opting out: GOOGLE_CLEAR_SOURCE not set
[detector] ======== Output: google.utils.label@0.0.2 ========
[detector] Opting in: always enabled
[detector] ======== Results ========
[detector] fail: google.java.runtime@0.9.1
[detector] fail: google.java.maven@0.9.0
[detector] pass: google.java.entrypoint@0.9.0
[detector] skip: google.java.clear_source@0.9.0
[detector] pass: google.utils.label@0.0.2
[detector] ======== Output: google.java.runtime@0.9.1 ========
[detector] Opting out: none of the following found: pom.xml, .mvn/extensions.xml, build.gradle, build.gradle.kts, META-INF/MANIFEST.MF, *.java, *.jar
[detector] ======== Output: google.java.gradle@0.9.0 ========
[detector] Opting out: neither build.gradle nor build.gradle.kts found
[detector] ======== Output: google.config.entrypoint@0.9.0 ========
[detector] Opting in: found Procfile
[detector] ======== Output: google.java.clear_source@0.9.0 ========
[detector] Opting out: GOOGLE_CLEAR_SOURCE not set
[detector] ======== Output: google.utils.label@0.0.2 ========
[detector] Opting in: always enabled
[detector] ======== Results ========
[detector] fail: google.java.runtime@0.9.1
[detector] skip: google.java.gradle@0.9.0
[detector] pass: google.config.entrypoint@0.9.0
[detector] skip: google.java.clear_source@0.9.0
[detector] pass: google.utils.label@0.0.2
[detector] ======== Output: google.java.runtime@0.9.1 ========
[detector] Opting out: none of the following found: pom.xml, .mvn/extensions.xml, build.gradle, build.gradle.kts, META-INF/MANIFEST.MF, *.java, *.jar
[detector] ======== Output: google.java.gradle@0.9.0 ========
[detector] Opting out: neither build.gradle nor build.gradle.kts found
[detector] ======== Output: google.java.entrypoint@0.9.0 ========
[detector] Opting in: always enabled
[detector] ======== Output: google.java.clear_source@0.9.0 ========
[detector] Opting out: GOOGLE_CLEAR_SOURCE not set
[detector] ======== Output: google.utils.label@0.0.2 ========
[detector] Opting in: always enabled
[detector] ======== Results ========
[detector] fail: google.java.runtime@0.9.1
[detector] skip: google.java.gradle@0.9.0
[detector] pass: google.java.entrypoint@0.9.0
[detector] skip: google.java.clear_source@0.9.0
[detector] pass: google.utils.label@0.0.2
[detector] ======== Output: google.config.flex@0.9.1 ========
[detector] Opting out: Env var GAE_APPLICATION_YAML_PATH is not set, not a GAE Flex app.
[detector] ======== Output: google.python.runtime@0.9.1 ========
[detector] Opting out: no .py files found
[detector] ======== Output: google.python.pip@0.9.2 ========
[detector] Opting in: always enabled
[detector] ======== Output: google.python.webserver@0.9.1 ========
[detector] Opting in: requirements.txt with gunicorn not found
[detector] ======== Output: google.config.entrypoint@0.9.0 ========
[detector] Opting in: found Procfile
[detector] ======== Output: google.utils.label@0.0.2 ========
[detector] Opting in: always enabled
[detector] ======== Results ========
[detector] fail: google.config.flex@0.9.1
[detector] fail: google.python.runtime@0.9.1
[detector] pass: google.python.pip@0.9.2
[detector] pass: google.python.webserver@0.9.1
[detector] pass: google.config.entrypoint@0.9.0
[detector] pass: google.utils.label@0.0.2
[detector] ======== Output: google.python.runtime@0.9.1 ========
[detector] Opting out: no .py files found
[detector] ======== Output: google.python.functions-framework@0.9.6 ========
[detector] Opting out: GOOGLE_FUNCTION_TARGET not set
[detector] ======== Output: google.python.pip@0.9.2 ========
[detector] Opting in: always enabled
[detector] ======== Output: google.config.entrypoint@0.9.0 ========
[detector] Opting in: found Procfile
[detector] ======== Output: google.utils.label@0.0.2 ========
[detector] Opting in: always enabled
[detector] ======== Results ========
[detector] fail: google.python.runtime@0.9.1
[detector] fail: google.python.functions-framework@0.9.6
[detector] pass: google.python.pip@0.9.2
[detector] pass: google.config.entrypoint@0.9.0
[detector] pass: google.utils.label@0.0.2
[detector] ======== Output: google.python.runtime@0.9.1 ========
[detector] Opting out: no .py files found
[detector] ======== Output: google.python.pip@0.9.2 ========
[detector] Opting in: always enabled
[detector] ======== Output: google.config.entrypoint@0.9.0 ========
[detector] Opting in: found Procfile
[detector] ======== Output: google.utils.label@0.0.2 ========
[detector] Opting in: always enabled
[detector] ======== Results ========
[detector] fail: google.python.runtime@0.9.1
[detector] pass: google.python.pip@0.9.2
[detector] pass: google.config.entrypoint@0.9.0
[detector] pass: google.utils.label@0.0.2
[detector] ======== Output: google.ruby.runtime@0.0.1 ========
[detector] Opting in: found Gemfile
[detector] ======== Output: google.ruby.rubygems@0.9.0 ========
[detector] Opting in: found Gemfile
[detector] ======== Output: google.ruby.bundle@0.9.0 ========
[detector] Opting in: found Gemfile
[detector] ======== Output: google.ruby.rails@0.9.0 ========
[detector] Opting in: found Rails assets to precompile
[detector] ======== Output: google.config.entrypoint@0.9.0 ========
[detector] Opting in: found Procfile
[detector] ======== Output: google.utils.label@0.0.2 ========
[detector] Opting in: always enabled
[detector] ======== Results ========
[detector] pass: google.ruby.runtime@0.0.1
[detector] pass: google.ruby.rubygems@0.9.0
[detector] pass: google.ruby.bundle@0.9.0
[detector] pass: google.ruby.rails@0.9.0
[detector] pass: google.config.entrypoint@0.9.0
[detector] pass: google.utils.label@0.0.2
[detector] Resolving plan... (try #1)
[detector] google.ruby.runtime      0.0.1
[detector] google.ruby.rubygems     0.9.0
[detector] google.ruby.bundle       0.9.0
[detector] google.ruby.rails        0.9.0
[detector] google.config.entrypoint 0.9.0
[detector] google.utils.label       0.0.2
===> RESTORING
Running the restorer on OS linux with:
Container Settings:
  Args: /cnb/lifecycle/restorer -cache-dir /cache -log-level debug
  System Envs: CNB_USER_ID=1000 CNB_GROUP_ID=1000 CNB_PLATFORM_API=0.10
  Image: buildpacksio/lifecycle:0.15.1
  User: root
  Labels: map[author:pack]
Host Settings:
  Binds: pack-cache-library_shopify-indigo_latest-9a6e9f9acd6a.build:/cache pack-layers-gioytuatgw:/layers pack-app-imxwcfkuew:/workspace
  Network Mode:
[restorer] Reading buildpack directory: /layers/google.ruby.runtime
[restorer] Restoring metadata for "google.ruby.runtime:ruby" from app image
[restorer] Writing layer metadata for "google.ruby.runtime:ruby"
[restorer] Not restoring "google.ruby.runtime:ruby" from cache, marked as launch=true
[restorer] Reading buildpack directory: /layers/google.ruby.rubygems
[restorer] Restoring metadata for "google.ruby.rubygems:rubygems" from app image
[restorer] Writing layer metadata for "google.ruby.rubygems:rubygems"
[restorer] Not restoring "google.ruby.rubygems:rubygems" from cache, marked as launch=true
[restorer] Reading buildpack directory: /layers/google.ruby.bundle
[restorer] Restoring metadata for "google.ruby.bundle:gems" from app image
[restorer] Writing layer metadata for "google.ruby.bundle:gems"
[restorer] Not restoring "google.ruby.bundle:gems" from cache, marked as launch=true
[restorer] Reading buildpack directory: /layers/google.ruby.rails
[restorer] Restoring metadata for "google.ruby.rails:yarn" from cache
[restorer] Writing layer metadata for "google.ruby.rails:yarn"
[restorer] Reading buildpack directory: /layers/google.config.entrypoint
[restorer] Reading buildpack directory: /layers/google.utils.label
[restorer] Reading buildpack directory: /layers/google.ruby.runtime
[restorer] Reading buildpack directory item: ruby.toml
[restorer] Restoring data for "google.ruby.runtime:ruby" from cache
[restorer] Reading buildpack directory: /layers/google.ruby.rubygems
[restorer] Reading buildpack directory item: rubygems.toml
[restorer] Restoring data for "google.ruby.rubygems:rubygems" from cache
[restorer] Reading buildpack directory: /layers/google.ruby.bundle
[restorer] Reading buildpack directory item: gems.toml
[restorer] Restoring data for "google.ruby.bundle:gems" from cache
[restorer] Reading buildpack directory: /layers/google.ruby.rails
[restorer] Reading buildpack directory item: yarn.toml
[restorer] Restoring data for "google.ruby.rails:yarn" from cache
[restorer] Reading buildpack directory: /layers/google.config.entrypoint
[restorer] Reading buildpack directory: /layers/google.utils.label
[restorer] Retrieving data for "sha256:40e43c847212a47e3acff2f5c29306011e7093fe2cb4a64371d28ba2195564c6"
[restorer] Retrieving data for "sha256:b31bf7aa3fca0d4f69e48247f1129d2a85a40a2bacd44f2d6437d990145fc16b"
[restorer] Retrieving data for "sha256:103075f572af719b2f5819b1358eee1a1a3ad89f2f312f11d60c890e80f1bbc8"
[restorer] Retrieving data for "sha256:3d811058e0d7003ff3ef9386b4534be3ec1b161d5542f08b92489df90be75659"
===> BUILDING
Running the builder on OS linux with:
Container Settings:
  Args: /cnb/lifecycle/builder -app /workspace -log-level debug
  System Envs: CNB_PLATFORM_API=0.10
  Image: pack.local/builder/7a6772676f766d747378:latest
  User:
  Labels: map[author:pack]
Host Settings:
  Binds: pack-layers-gioytuatgw:/layers pack-app-imxwcfkuew:/workspace
  Network Mode:
[builder] Starting build
[builder] Running build for buildpack google.ruby.runtime@0.0.1
[builder] Looking up buildpack
[builder] Finding plan
[builder] Creating plan directory
[builder] Preparing paths
[builder] Running build command
[builder] === Ruby - Runtime (google.ruby.runtime@0.0.1) ===
[builder] Setting Nodejs runtime version GOOGLE_NODEJS_VERSION: 12.22.12
[builder] Ruby Runtime v3.1.2 cache hit, skipping installation.
[builder] Removing 'tmp' and 'log' directories in user code
[builder] Processing layers
[builder] Updating environment
[builder] Reading output files
[builder] Updating buildpack processes
[builder] Updating process list
[builder] Finished running build for buildpack google.ruby.runtime@0.0.1
[builder] Running build for buildpack google.ruby.rubygems@0.9.0
[builder] Looking up buildpack
[builder] Finding plan
[builder] Creating plan directory
[builder] Preparing paths
[builder] Running build command
[builder] === Ruby - Rubygems (google.ruby.rubygems@0.9.0) ===
[builder] 2022/12/20 21:28:14 [DEBUG] GET https://rubygems.org/rubygems/rubygems-3.3.15.tgz
[builder] --------------------------------------------------------------------------------
[builder] Running "ruby setup.rb -E --no-document --destdir /layers/google.ruby.rubygems/rubygems --prefix /"
[builder]   Successfully built RubyGem
[builder]   Name: bundler
[builder]   Version: 2.3.15
[builder]   File: bundler-2.3.15.gem
[builder] Bundler 2.3.15 installed
[builder] RubyGems 3.3.15 installed
[builder] Regenerating binstubs
[builder] Regenerating plugins
[builder]
[builder] # 3.3.15 / 2022-06-01
[builder]
[builder] ## Enhancements:
[builder]
[builder] * Support the change of did_you_mean about `Exception#detailed_message`.
[builder]   Pull request #5560 by mame
[builder] * Installs bundler 2.3.15 as a default gem.
[builder]
[builder] ## Bug fixes:
[builder]
[builder] * Fix loading old marshaled specs including `YAML::PrivateType` constant.
[builder]   Pull request #5415 by deivid-rodriguez
[builder] * Fix rubygems update when non default `--install-dir` is configured. Pull
[builder]   request #5566 by deivid-rodriguez
[builder]
[builder] # 3.3.14 / 2022-05-18
[builder]
[builder] ## Enhancements:
[builder]
[builder] * Installs bundler 2.3.14 as a default gem.
[builder]
[builder] # 3.3.13 / 2022-05-04
[builder]
[builder] ## Enhancements:
[builder]
[builder] * Installs bundler 2.3.13 as a default gem.
[builder]
[builder] ## Bug fixes:
[builder]
[builder] * Fix regression when resolving ruby constraints. Pull request #5486 by
[builder]   deivid-rodriguez
[builder]
[builder] ## Documentation:
[builder]
[builder] * Clarify description of owner-flags. Pull request #5497 by kronn
[builder]
[builder] # 3.3.12 / 2022-04-20
[builder]
[builder] ## Enhancements:
[builder]
[builder] * Less error swallowing when installing gems. Pull request #5475 by
[builder]   deivid-rodriguez
[builder] * Stop considering `RUBY_PATCHLEVEL` for resolution. Pull request #5472 by
[builder]   deivid-rodriguez
[builder] * Bump vendored optparse to latest master. Pull request #5466 by
[builder]   deivid-rodriguez
[builder] * Installs bundler 2.3.12 as a default gem.
[builder]
[builder] ## Documentation:
[builder]
[builder] * Fix formatting in docs. Pull request #5470 by peterzhu2118
[builder] * Fix a typo. Pull request #5401 by znz
[builder]
[builder] # 3.3.11 / 2022-04-07
[builder]
[builder] ## Enhancements:
[builder]
[builder] * Enable mfa on specific keys during gem signin. Pull request #5305 by
[builder]   aellispierce
[builder] * Prefer `__dir__` to `__FILE__`. Pull request #5444 by deivid-rodriguez
[builder] * Add cargo builder for rust extensions. Pull request #5175 by ianks
[builder] * Installs bundler 2.3.11 as a default gem.
[builder]
[builder] ## Documentation:
[builder]
[builder] * Improve RDoc setup. Pull request #5398 by deivid-rodriguez
[builder]
[builder] # 3.3.10 / 2022-03-23
[builder]
[builder] ## Enhancements:
[builder]
[builder] * Installs bundler 2.3.10 as a default gem.
[builder]
[builder] ## Documentation:
[builder]
[builder] * Enable `Gem::Package` example in RDoc documentation. Pull request #5399
[builder]   by nobu
[builder] * Unhide RDoc documentation from top level `Gem` module. Pull request
[builder]   #5396 by nobu
[builder]
[builder] # 3.3.9 / 2022-03-09
[builder]
[builder] ## Enhancements:
[builder]
[builder] * Installs bundler 2.3.9 as a default gem.
[builder]
[builder] # 3.3.8 / 2022-02-23
[builder]
[builder] ## Enhancements:
[builder]
[builder] * Installs bundler 2.3.8 as a default gem.
[builder]
[builder] # 3.3.7 / 2022-02-09
[builder]
[builder] ## Enhancements:
[builder]
[builder] * Installs bundler 2.3.7 as a default gem.
[builder]
[builder] ## Documentation:
[builder]
[builder] * Fix missing rdoc for `Gem::Version`. Pull request #5299 by nevans
[builder]
[builder] # 3.3.6 / 2022-01-26
[builder]
[builder] ## Enhancements:
[builder]
[builder] * Forbid downgrading past the originally shipped version on Ruby 3.1. Pull
[builder]   request #5301 by deivid-rodriguez
[builder] * Support `--enable-load-relative` inside binstubs. Pull request #2929 by
[builder]   deivid-rodriguez
[builder] * Let `Version#<=>` accept a String. Pull request #5275 by amatsuda
[builder] * Installs bundler 2.3.6 as a default gem.
[builder]
[builder] ## Bug fixes:
[builder]
[builder] * Avoid `flock` on non Windows systems, since it causing issues on NFS
[builder]   file systems. Pull request #5278 by deivid-rodriguez
[builder] * Fix `gem update --system`  for already installed version of
[builder]   `rubygems-update`. Pull request #5285 by loadkpi
[builder]
[builder] # 3.3.5 / 2022-01-12
[builder]
[builder] ## Enhancements:
[builder]
[builder] * Don't activate `yaml` gem from RubyGems. Pull request #5266 by
[builder]   deivid-rodriguez
[builder] * Let `gem fetch` understand `<gem>:<version>` syntax and
[builder]   `--[no-]suggestions` flag. Pull request #5242 by ximenasandoval
[builder] * Installs bundler 2.3.5 as a default gem.
[builder]
[builder] ## Bug fixes:
[builder]
[builder] * Fix `gem install <non-existent-gem> --force` crash. Pull request #5262
[builder]   by deivid-rodriguez
[builder] * Fix longstanding `gem install` failure on JRuby. Pull request #5228 by
[builder]   deivid-rodriguez
[builder]
[builder] ## Documentation:
[builder]
[builder] * Markup `Gem::Specification` documentation with RDoc notations. Pull
[builder]   request #5268 by nobu
[builder]
[builder] # 3.3.4 / 2021-12-29
[builder]
[builder] ## Enhancements:
[builder]
[builder] * Don't redownload `rubygems-update` package if already there. Pull
[builder]   request #5230 by deivid-rodriguez
[builder] * Installs bundler 2.3.4 as a default gem.
[builder]
[builder] ## Bug fixes:
[builder]
[builder] * Fix `gem update --system` crashing when latest version not supported.
[builder]   Pull request #5191 by deivid-rodriguez
[builder]
[builder] ## Performance:
[builder]
[builder] * Make SpecificationPolicy autoload constant. Pull request #5222 by pocke
[builder]
[builder] # 3.3.3 / 2021-12-24
[builder]
[builder] ## Enhancements:
[builder]
[builder] * Installs bundler 2.3.3 as a default gem.
[builder]
[builder] ## Bug fixes:
[builder]
[builder] * Fix gem installation failing in Solaris due to bad `IO#flock` usage.
[builder]   Pull request #5216 by mame
[builder]
[builder] # 3.3.2 / 2021-12-23
[builder]
[builder] ## Enhancements:
[builder]
[builder] * Fix deprecations when activating DidYouMean for misspelled command
[builder]   suggestions. Pull request #5211 by yuki24
[builder] * Installs bundler 2.3.2 as a default gem.
[builder]
[builder] ## Bug fixes:
[builder]
[builder] * Fix gemspec truncation. Pull request #5208 by deivid-rodriguez
[builder]
[builder] # 3.3.1 / 2021-12-22
[builder]
[builder] ## Enhancements:
[builder]
[builder] * Fix compatibility with OpenSSL 3.0. Pull request #5196 by rhenium
[builder] * Remove hard errors when matching major bundler not found. Pull request
[builder]   #5181 by deivid-rodriguez
[builder] * Installs bundler 2.3.1 as a default gem.
[builder]
[builder]
[builder] ------------------------------------------------------------------------------
[builder]
[builder] RubyGems installed the following executables:
[builder]   /layers/google.ruby.rubygems/rubygems/bin/gem
[builder]   /layers/google.ruby.rubygems/rubygems/bin/bundle
[builder]   /layers/google.ruby.rubygems/rubygems/bin/bundler
[builder]
[builder] Done "ruby setup.rb -E --no-document --destdir /layers/google.ruby..." (2.316992334s)
[builder] Processing layers
[builder] Updating environment
[builder] Reading output files
[builder] Updating buildpack processes
[builder] Updating process list
[builder] Finished running build for buildpack google.ruby.rubygems@0.9.0
[builder] Running build for buildpack google.ruby.bundle@0.9.0
[builder] Looking up buildpack
[builder] Finding plan
[builder] Creating plan directory
[builder] Preparing paths
[builder] Running build command
[builder] === Ruby - Bundle (google.ruby.bundle@0.9.0) ===
[builder] Dependencies cache hit, skipping installation.
[builder] --------------------------------------------------------------------------------
[builder] Running "bundle config --local without development test"
[builder] Done "bundle config --local without development test" (835.940667ms)
[builder] --------------------------------------------------------------------------------
[builder] Running "bundle config --local path .bundle/gems"
[builder] Done "bundle config --local path .bundle/gems" (829.303334ms)
[builder] --------------------------------------------------------------------------------
[builder] Running "bundle lock --add-platform x86_64-linux"
[builder] Writing lockfile to /workspace/Gemfile.lock
[builder] Done "bundle lock --add-platform x86_64-linux" (1.455331167s)
[builder] --------------------------------------------------------------------------------
[builder] Running "bundle lock --add-platform ruby"
[builder] Fetching gem metadata from https://rubygems.org/..........
[builder] Resolving dependencies.......................
[builder] Writing lockfile to /workspace/Gemfile.lock
[builder] Done "bundle lock --add-platform ruby" (15.42085509s)
[builder] Processing layers
[builder] Updating environment
[builder] Reading output files
[builder] Updating buildpack processes
[builder] Updating process list
[builder] Finished running build for buildpack google.ruby.bundle@0.9.0
[builder] Running build for buildpack google.ruby.rails@0.9.0
[builder] Looking up buildpack
[builder] Finding plan
[builder] Creating plan directory
[builder] Preparing paths
[builder] Running build command
[builder] === Ruby - Rails (google.ruby.rails@0.9.0) ===
[builder] Running Rails asset precompilation
[builder] 2022/12/20 21:28:36 [DEBUG] GET https://registry.npmjs.org/yarn
[builder] Yarn cache hit, skipping installation.
[builder] --------------------------------------------------------------------------------
[builder] Running "bundle exec ruby bin/rails assets:precompile (RAILS_ENV=production MALLOC_ARENA_MAX=2 RAILS_LOG_TO_STDOUT=true LANG=C.utf8)"
[builder] Yarn requires Node.js 4.0 or higher to be installed.
[builder] rails aborted!
[builder] jsbundling-rails: Command build failed, ensure yarn is installed and `yarn build` runs without errors
[builder]
[builder] Tasks: TOP => assets:precompile => javascript:build
[builder] (See full trace by running task with --trace)
[builder] Done "bundle exec ruby bin/rails assets:precompile (RAILS_ENV=prod..." (7.952995671s)
[builder] WARNING: Asset precompilation returned non-zero exit code 1. Ignoring.
[builder] Processing layers
[builder] Updating environment
[builder] Reading output files
[builder] Updating buildpack processes
[builder] Updating process list
[builder] Finished running build for buildpack google.ruby.rails@0.9.0
[builder] Running build for buildpack google.config.entrypoint@0.9.0
[builder] Looking up buildpack
[builder] Finding plan
[builder] Creating plan directory
[builder] Preparing paths
[builder] Running build command
[builder] === Config - Entrypoint (google.config.entrypoint@0.9.0) ===
[builder] Using entrypoint from Procfile: bin/rails server -p 3000
[builder] Processing layers
[builder] Updating environment
[builder] Reading output files
[builder] Updating buildpack processes
[builder] Updating process list
[builder] Finished running build for buildpack google.config.entrypoint@0.9.0
[builder] Running build for buildpack google.utils.label@0.0.2
[builder] Looking up buildpack
[builder] Finding plan
[builder] Creating plan directory
[builder] Preparing paths
[builder] Running build command
[builder] === Utils - Label Image (google.utils.label@0.0.2) ===
[builder] Processing layers
[builder] Updating environment
[builder] Reading output files
[builder] Updating buildpack processes
[builder] Updating process list
[builder] Finished running build for buildpack google.utils.label@0.0.2
[builder] Copying SBOM files
[builder] Creating SBOM files for legacy BOM
[builder] Listing processes
[builder] Finished build
===> EXPORTING
Running the exporter on OS linux with:
Container Settings:
  Args: /cnb/lifecycle/exporter -daemon -launch-cache /launch-cache -log-level debug -app /workspace -cache-dir /cache -stack /layers/stack.toml shopify-indigo
  System Envs: CNB_USER_ID=1000 CNB_GROUP_ID=1000 CNB_PLATFORM_API=0.10
  Image: buildpacksio/lifecycle:0.15.1
  User: root
  Labels: map[author:pack]
Host Settings:
  Binds: pack-cache-library_shopify-indigo_latest-9a6e9f9acd6a.build:/cache /var/run/docker.sock:/var/run/docker.sock pack-cache-library_shopify-indigo_latest-9a6e9f9acd6a.launch:/launch-cache pack-layers-gioytuatgw:/layers pack-app-imxwcfkuew:/workspace
  Network Mode:
[exporter] Using runImage from analyzed metadata '64d105639de9a80510a6a4231ebc51c7cbc9da4b4f73343f1caa7e411a4bbb81'
[exporter] Reusing layers from image with id '232cc96703c8ac94f4a5fb70a27ef27edb5603df491cfc1ac2bfebb84278460f'
[exporter] Reading buildpack directory: /layers/google.ruby.runtime
[exporter] Reading buildpack directory item: build.toml
[exporter] Reading buildpack directory item: launch.toml
[exporter] Reading buildpack directory item: ruby
[exporter] Reading buildpack directory item: ruby.toml
[exporter] Processing buildpack directory: /layers/google.ruby.runtime
[exporter] Processing launch layer: /layers/google.ruby.runtime/ruby
[exporter] Reusing tarball for layer "google.ruby.runtime:ruby" with SHA: sha256:103075f572af719b2f5819b1358eee1a1a3ad89f2f312f11d60c890e80f1bbc8
[exporter] Reusing layer 'google.ruby.runtime:ruby'
[exporter] Layer 'google.ruby.runtime:ruby' SHA: sha256:103075f572af719b2f5819b1358eee1a1a3ad89f2f312f11d60c890e80f1bbc8
[exporter] Reading buildpack directory: /layers/google.ruby.rubygems
[exporter] Reading buildpack directory item: rubygems
[exporter] Reading buildpack directory item: rubygems.toml
[exporter] Processing buildpack directory: /layers/google.ruby.rubygems
[exporter] Processing launch layer: /layers/google.ruby.rubygems/rubygems
[exporter] Reusing tarball for layer "google.ruby.rubygems:rubygems" with SHA: sha256:40e43c847212a47e3acff2f5c29306011e7093fe2cb4a64371d28ba2195564c6
[exporter] Reusing layer 'google.ruby.rubygems:rubygems'
[exporter] Layer 'google.ruby.rubygems:rubygems' SHA: sha256:40e43c847212a47e3acff2f5c29306011e7093fe2cb4a64371d28ba2195564c6
[exporter] Reading buildpack directory: /layers/google.ruby.bundle
[exporter] Reading buildpack directory item: gems
[exporter] Reading buildpack directory item: gems.toml
[exporter] Processing buildpack directory: /layers/google.ruby.bundle
[exporter] Processing launch layer: /layers/google.ruby.bundle/gems
[exporter] Reusing tarball for layer "google.ruby.bundle:gems" with SHA: sha256:b31bf7aa3fca0d4f69e48247f1129d2a85a40a2bacd44f2d6437d990145fc16b
[exporter] Reusing layer 'google.ruby.bundle:gems'
[exporter] Layer 'google.ruby.bundle:gems' SHA: sha256:b31bf7aa3fca0d4f69e48247f1129d2a85a40a2bacd44f2d6437d990145fc16b
[exporter] Reading buildpack directory: /layers/google.ruby.rails
[exporter] Reading buildpack directory item: build.toml
[exporter] Reading buildpack directory item: yarn
[exporter] Reading buildpack directory item: yarn.toml
[exporter] Processing buildpack directory: /layers/google.ruby.rails
[exporter] Reading buildpack directory: /layers/google.config.entrypoint
[exporter] Reading buildpack directory item: launch.toml
[exporter] Processing buildpack directory: /layers/google.config.entrypoint
[exporter] Reading buildpack directory: /layers/google.utils.label
[exporter] Processing buildpack directory: /layers/google.utils.label
[exporter] Found SBOM of type launch for at /layers/sbom/launch
[exporter] Reusing tarball for layer "launch.sbom" with SHA: sha256:827a40f10c0787f7ae4545cf3bc11c131311fae52e2039e17b3ff14e41c7936d
[exporter] Reusing layer 'launch.sbom'
[exporter] Layer 'launch.sbom' SHA: sha256:827a40f10c0787f7ae4545cf3bc11c131311fae52e2039e17b3ff14e41c7936d
[exporter] Layer 'slice-1' SHA: sha256:ad6e9e9ad2c723526af7e36f7774f599706a5ed7fa326cb38bc1f2c3f60b1985
[exporter] Reusing 1/1 app layer(s)
[exporter] Reusing tarball for layer "launcher" with SHA: sha256:858993968eddb555230627d56e7cad1dc1060525199bb696df5e67aabaa1878a
[exporter] Reusing layer 'launcher'
[exporter] Layer 'launcher' SHA: sha256:858993968eddb555230627d56e7cad1dc1060525199bb696df5e67aabaa1878a
[exporter] Reusing tarball for layer "config" with SHA: sha256:1dbb2b2aee9d15fe57a513fc556f6113a18b0ebe7c1a247652f0a23f2171a985
[exporter] Reusing layer 'config'
[exporter] Layer 'config' SHA: sha256:1dbb2b2aee9d15fe57a513fc556f6113a18b0ebe7c1a247652f0a23f2171a985
[exporter] Reusing tarball for layer "process-types" with SHA: sha256:83d85471d9f8a3834b4e27cf701e3f0aef220cc816d9c173c7d32cd73909a590
[exporter] Reusing layer 'process-types'
[exporter] Layer 'process-types' SHA: sha256:83d85471d9f8a3834b4e27cf701e3f0aef220cc816d9c173c7d32cd73909a590
[exporter] Adding label 'io.buildpacks.lifecycle.metadata'
[exporter] Adding label 'io.buildpacks.build.metadata'
[exporter] Adding label 'io.buildpacks.project.metadata'
[exporter] Setting CNB_LAYERS_DIR=/layers
[exporter] Setting CNB_APP_DIR=/workspace
[exporter] Setting CNB_PLATFORM_API=0.10
[exporter] Setting CNB_DEPRECATION_MODE=quiet
[exporter] Prepending /cnb/process and /cnb/lifecycle to PATH
[exporter] Setting WORKDIR: '/workspace'
[exporter] Setting default process type 'web'
[exporter] Setting ENTRYPOINT: '/cnb/process/web'
[exporter] Saving shopify-indigo...
[exporter] *** Images (232cc96703c8):
[exporter]       shopify-indigo
[exporter]
[exporter] *** Image ID: 232cc96703c8ac94f4a5fb70a27ef27edb5603df491cfc1ac2bfebb84278460f
[exporter] Reading buildpack directory: /layers/google.ruby.runtime
[exporter] Reading buildpack directory item: build.toml
[exporter] Reading buildpack directory item: launch.toml
[exporter] Reading buildpack directory item: ruby
[exporter] Reading buildpack directory item: ruby.toml
[exporter] Reusing tarball for layer "google.ruby.runtime:ruby" with SHA: sha256:103075f572af719b2f5819b1358eee1a1a3ad89f2f312f11d60c890e80f1bbc8
[exporter] Reusing cache layer 'google.ruby.runtime:ruby'
[exporter] Layer 'google.ruby.runtime:ruby' SHA: sha256:103075f572af719b2f5819b1358eee1a1a3ad89f2f312f11d60c890e80f1bbc8
[exporter] Reading buildpack directory: /layers/google.ruby.rubygems
[exporter] Reading buildpack directory item: rubygems
[exporter] Reading buildpack directory item: rubygems.toml
[exporter] Reusing tarball for layer "google.ruby.rubygems:rubygems" with SHA: sha256:40e43c847212a47e3acff2f5c29306011e7093fe2cb4a64371d28ba2195564c6
[exporter] Reusing cache layer 'google.ruby.rubygems:rubygems'
[exporter] Layer 'google.ruby.rubygems:rubygems' SHA: sha256:40e43c847212a47e3acff2f5c29306011e7093fe2cb4a64371d28ba2195564c6
[exporter] Reading buildpack directory: /layers/google.ruby.bundle
[exporter] Reading buildpack directory item: gems
[exporter] Reading buildpack directory item: gems.toml
[exporter] Reusing tarball for layer "google.ruby.bundle:gems" with SHA: sha256:b31bf7aa3fca0d4f69e48247f1129d2a85a40a2bacd44f2d6437d990145fc16b
[exporter] Reusing cache layer 'google.ruby.bundle:gems'
[exporter] Layer 'google.ruby.bundle:gems' SHA: sha256:b31bf7aa3fca0d4f69e48247f1129d2a85a40a2bacd44f2d6437d990145fc16b
[exporter] Reading buildpack directory: /layers/google.ruby.rails
[exporter] Reading buildpack directory item: build.toml
[exporter] Reading buildpack directory item: yarn
[exporter] Reading buildpack directory item: yarn.toml
[exporter] Reusing cache layer 'google.ruby.rails:yarn'
[exporter] Layer 'google.ruby.rails:yarn' SHA: sha256:3d811058e0d7003ff3ef9386b4534be3ec1b161d5542f08b92489df90be75659
[exporter] Reading buildpack directory: /layers/google.config.entrypoint
[exporter] Reading buildpack directory item: launch.toml
[exporter] Reading buildpack directory: /layers/google.utils.label
Successfully built image shopify-indigo
clupprich commented 1 year ago

Here's a minimal Rails app that shows the issue: https://github.com/clupprich/gcp_buildpacks_test

smsohan commented 1 year ago

Thanks for reporting this issue. We'll take a look at it.

shreejad commented 1 year ago

I have a change out to fix this. The OSS builder, the one you are using, has not supported Rails asset precompilation till now. Once this change is in, the NodeJS buildpack should be installed.

To work around this issue without the upcoming fix, you can locally run bundle exec ruby bin/rails assets:precompile and deploy the app. This leads to the asset precompilation being done locally, so the "rails" buildpack will not be executed during app deployment.

shreejad commented 1 year ago

The change is in. @clupprich Can you retry your build?

clupprich commented 1 year ago

Hm, this isn't yet live on gcr.io/buildpacks/builder, right? Cause the latest tag there is still from December 13.

shreejad commented 1 year ago

Ah right, we have a holiday freeze going on, so the next builder image will be published on 2023-01-03.

There are 2 workarounds for now:

  1. Use the Ruby language-specific builder at gcr.io/gae-runtimes/buildpacks/ruby/builder
  2. Do asset precompilation locally (bundle exec ruby bin/rails assets:precompile) and then create the application image

@clupprich IIUC, when you use pack build to create your app container, you are able to create a container, but since the asset precompilation step has failed, the app is not able to serve some assets?

shreejad commented 1 year ago

*For clarification, the latest gcr.io/buildpacks/builder image will be published on January 3rd, 2023.

clupprich commented 1 year ago

@shreejad No worries, I can totally wait those couple of days.

You're right - the image can be built, but assets are missing.

clupprich commented 1 year ago

@shreejad Sorry, I forgot about this over the holidays.

So building the example repo with the gcr.io/buildpacks/builder image works now, the nodejs buildpack gets detected and used:

===> DETECTING
[detector] google.ruby.runtime      0.0.1
[detector] google.ruby.rubygems     0.9.0
[detector] google.ruby.bundle       0.9.0
[detector] google.nodejs.runtime    1.0.0
[detector] google.ruby.rails        0.9.0
[detector] google.config.entrypoint 0.9.0
[detector] google.utils.label       0.0.2

However, when using a custom build image (because I need some more dependencies to build the gem for Postgres), the nodejs buildpack doesn't get detected:

===> DETECTING
[detector] google.ruby.runtime      0.0.1
[detector] google.ruby.rubygems     0.9.0
[detector] google.ruby.bundle       0.9.0
[detector] google.ruby.rails        0.9.0
[detector] google.config.entrypoint 0.9.0
[detector] google.utils.label       0.0.2

That's odd, and I'm wondering what I'm doing wrong. Here's the builder.Dockerfile I'm using (taken & modified from https://cloud.google.com/docs/buildpacks/build-run-image):

FROM gcr.io/buildpacks/builder
USER root
RUN apt-get update && apt-get install -y --no-install-recommends \
  libssl-dev libpq-dev && \
  apt-get clean && \
  rm -rf /var/lib/apt/lists/*
USER cnb

Edit: I was pushing the wrong container image up to the registry, my bad. All good now. Thank you!