I'm using google cloud build to deploy my rails application. Just recently I upgraded my ruby version to 3.2. I'm using foreman as entrypoint in the app.yaml without arguments and added the runtime_config which I found was necessary for ruby 3.2 (according Google docs).
Here is the code snippet of app.yaml:
runtime: ruby entrypoint: bundle exec foreman start env: flex runtime_config: operating_system: "ubuntu22"
Now I'm getting the following error:
Step #1: Step #2 - "build": === Ruby - Flex Entrypoint (google.ruby.flex-entrypoint@0.9.0) === Step #1: Step #2 - "build": Using entrypoint bundle exec foreman start -o 0.0.0.0 Step #1: ERROR: (gcloud.app.deploy) Error Response: [9] An internal error occurred while processing task /app-engine-flex/flex_await_healthy/flex_await_healthy>2024-01-03T08:36:50.619Z16311.wm.1: ERROR: "foreman start" was called with arguments ["-o", "0.0.0.0"] Step #1: Usage: "foreman start [PROCESS]" Step #1: Finished Step #1 ERROR ERROR: build step 1 "gcr.io/google.com/cloudsdktool/cloud-sdk" failed: step exited with non-zero status: 1
Somehow it adds the argument "-o 0.0.0.0" to the foreman start command.
I would not expect the build to add an argument. I tried adding my own argument but resulted in this:
Step #1: Step #2 - "build": === Ruby - Flex Entrypoint (google.ruby.flex-entrypoint@0.9.0) === Step #1: Step #2 - "build": Using entrypoint bundle exec foreman start -m "web=1,worker=1" -o 0.0.0.0
with ruby 2.7 it all works fine:
Step #1: Step #1: ## Command to start application. Step #1: Step #1: CMD exec bundle exec foreman start
Why does Google buildpack add this argument and how can I remove it?
Solved! Go to Solution.
Hi @unknown1,
Welcome to Google Cloud Community!
I've managed to replicate the issue and it seems that I couldn't make foreman to work with Ruby 3.2. I also got the same error when deploying it in App Engine however works fine when using Rails, Puma, Rack and Sinatra.
Here are some of the suggestions I could provide:
You may check this documentation on the Ruby runtime for additional information.
Hope this helps.
Hi @unknown1,
Welcome to Google Cloud Community!
I've managed to replicate the issue and it seems that I couldn't make foreman to work with Ruby 3.2. I also got the same error when deploying it in App Engine however works fine when using Rails, Puma, Rack and Sinatra.
Here are some of the suggestions I could provide:
You may check this documentation on the Ruby runtime for additional information.
Hope this helps.
Hi @robertcarlos ,
Thank you, appreciate your help! I have the exact same conclusion. The issue is only with buildpacks. Ruby 3.3 has - as expected - the same issue.
I didn't know about filing the bug through issue tracker. Will do that right away!
We have the same problem with App Engine with Flex environment and Ruby 3.2.
We have had no problems until Friday, July 19. Indeed, the problem is in the Buildpacks.
Has anyone managed to solve it?