If you're running a Rails app in Google App Engine's flexible environment, it takes a bit of setup to get to a rails console attached to your deployed environment. I wanted to document the steps for my own reference and also as an aid to others.
-
Open the Google App Engine -> instances section of the Google Cloud Platform (GCP) console.
-
Select the "SSH" drop-down for a running instance. (Which instance? Both of my instances are in the same cluster, and both are running Rails, so it didn't matter for me. YMMV.) You have a choice about how to connect via ssh.
-
Choose "Open in browser window" to open a web-based SSH session, which is convenient but potentially awkward.
-
Choose "View
gcloud
command" to view and copy agcloud
command that you can use from a terminal, which lets you use your favorite terminal app but may require the extra steps of installing thegcloud
command and authenticating thegcloud
command with GCP.
-