title: Error while deploying Rails 6 app to Google Cloud Platform App Engine
body: <p>I have developed the first iteration of an app using Ruby on Rails (ROR - v6.0.0; Ruby - v2.6.3). I need to deploy it to gcp, google cloud platform as that is what the company I work for uses. I followed the tutorial google has for this, as seen <a href="https://cloud.google.com/ruby/rails/appengine" rel="nofollow noreferrer">here</a>. However, no matter what I do, near the end of the push I get this error:</p>
  
  <pre><code>8536b8dd72f7: Pushed
  f66b9865f45c: Layer already exists
  8f213bf0e9c7: Pushed
  ce02b74896ad: Pushed
  a79efcc05468: Pushed
  latest: digest: sha256:93b405b42825c93798db12c14f4f5d5dd09c6fc3e32861a1a1f3947c338e45a2 size: 2419
  DONE
  -----------------------------------------------------------------------------------------------------------------------------------------------------------
  
  Updating service [default] (this may take several minutes)...failed.
  ERROR: (gcloud.app.deploy) Error Response: [9]
  Application startup error:
  Puma starting in single mode...
  * Version 3.12.1 (ruby 2.6.3-p62), codename: Llamas in Pajamas
  * Min threads: 5, max threads: 5
  * Environment: production
  * Listening on tcp://0.0.0.0:8080
  bundler: failed to load command: rackup (/app/vendor/bundle/ruby/2.6.0/bin/rackup)
  Errno::ENOENT: No such file or directory @ rb_sysopen - tmp/pids/server.pid
    /app/vendor/bundle/ruby/2.6.0/gems/puma-3.12.1/lib/puma/launcher.rb:133:in `initialize'
    /app/vendor/bundle/ruby/2.6.0/gems/puma-3.12.1/lib/puma/launcher.rb:133:in `open'
    /app/vendor/bundle/ruby/2.6.0/gems/puma-3.12.1/lib/puma/launcher.rb:133:in `write_pid'
    /app/vendor/bundle/ruby/2.6.0/gems/puma-3.12.1/lib/puma/launcher.rb:106:in `write_state'
    /app/vendor/bundle/ruby/2.6.0/gems/puma-3.12.1/lib/puma/single.rb:103:in `run'
    /app/vendor/bundle/ruby/2.6.0/gems/puma-3.12.1/lib/puma/launcher.rb:186:in `run'
    /app/vendor/bundle/ruby/2.6.0/gems/puma-3.12.1/lib/rack/handler/puma.rb:73:in `run'
    /app/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/server.rb:297:in `start'
    /app/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/lib/rack/server.rb:148:in `start'
    /app/vendor/bundle/ruby/2.6.0/gems/rack-2.0.7/bin/rackup:4:in `&lt;top (required)&gt;'
    /app/vendor/bundle/ruby/2.6.0/bin/rackup:23:in `load'
    /app/vendor/bundle/ruby/2.6.0/bin/rackup:23:in `&lt;top (required)&gt;'
  
  </code></pre>
  
  <p>The strange thing is, I tried following google's tutorial with a brand new rails app (same machine, same environment), and I got the same error. Billing is enabled for the account, so I don't think it's that. The app works just fine when I run it locally. Anyway, here is my 'app.yml' file:</p>
  
  <pre><code>entrypoint: bundle exec rackup --port $PORT
  env: flex
  runtime: ruby
  
  env_variables:
      SECRET_KEY_BASE: [MY_SECRET_KEY_IS_HERE]
  
  </code></pre>
  
  <p>When I run <code>bundle exec rackup --port 8080</code> on my local machine, the app starts up just fine. I've searched all over and haven't been able to find a solution. I've seen similar posts, but they either aren't answered or do not solve this issue. I'm considering 'dockerizing' the app, not sure that would fix anything; But if I understand correctly docker is a way of telling other machines how to run a specific set of instructions, like an app, so that it can run on almost any machine. Idk, that's really all I can think of. Any and all suggestions are welcome and would be appreciated. </p>
  
  <p>Thank you for your time in reading this, and I otherwise hope you have a great day.</p>