So your app runs at 0 CPU when there is no requests ongoing, and can't use more than 1 processes in the same container. It means you can't have a container with nginx+rails, as only nginx will have a core to execute, rails has no core and it leads to a timeout.
Maybe you should ensure your app is not trying to use a second process?
[0] https://cloud.google.com/run/docs/configuring/cpu-allocation