I am trying to deploy my Rails app to Google Cloud using App Engine Flexible Environment. Everything works fine when I run gcloud app deploy
, but at the very end, when App Engine tries to run my application using bundle exec rails server -p $PORT
, as specified in my app.yaml
file, it crashes and gives the following error message:
Error Response: [9] Application startup error: 'bundler: command not found: rails Install missing gem executables with
bundle install
I tried changing the entrypoint
value, running bundle install
again and again, and installing all my gem files locally, but none of that worked. I also tried installing rack and changing the endpoint to run the app using rackup
command, but that didn't work either. I am also skipping my gemfile.lock
in my app.yaml
file due to a previous error that was solved on SO.
I think you'd also want to install bundler in your container instance.
The reason I was getting this error is because I was skipping the
Gemfile.lock
due to a previous error that I thought was solved here. The aforementioned 'solution' led to this error. The solution that I found is to make some edits toGemfile.lock
that solved the issue instead of avoiding it. The edits can be seen here.