GoogleCloudPlatform / GoogleCloudPlatform/ruby-docs-samples

Rails7 deployment to GAE Flex fails: Your runtime version for ruby is past End of Support.

Ouverte
#1,476 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
samples
Langage dominant
Ruby
Étoiles
235
Forks
210
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

Googlers: see b/365178099.

I've noticed in both MySQL and PostgreS tutorials, that when you follow the tutorial for https://cloud.google.com/ruby/rails/using-cloudsql-postgres (for instance), it fails at the step

`gcloud app deploy`

And the failure carries this error:

```
╔════════════════════════════════════════════════════════════╗
╠═ Uploading 2777 files to Google Cloud Storage ═╣
╚════════════════════════════════════════════════════════════╝
File upload done.
ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: Error(s) encountered validating runtime. Your runtime version for ruby is past End of Support. Please upgrade to the latest runtime version available..
- '@type': [type.googleapis.com/google.rpc.DebugInfo](http://type.googleapis.com/google.rpc.DebugInfo)
detail: '[ORIGINAL ERROR] generic::invalid_argument: com.google.net.rpc3.RpcException:
generic::INVALID_ARGUMENT: Error(s) encountered validating runtime. Your runtime
version for ruby is past End of Support. Please upgrade to the latest runtime
version available.. [google.rpc.error_details_ext] { code: 3 message: "Error(s)
encountered validating runtime. Your runtime version for ruby is past End of Support.
Please upgrade to the latest runtime version available.." }'
```

Looking at latest rubies supported by Flex, I noticed that you should use 3.2 or 3.3 which in turn are warranted just by ubuntu22. So as not obvious at it may sound, a neat solution is to add this to app.yaml:

```
runtime: ruby
env: flex

# Yup, this part enforces ruby 3.2/3.3 and then the error disappears
runtime_config:
operating_system: "ubuntu22"
```

## Note

I havent tried the same with Mysql but I'm pretty sure the bug is also there.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par le tutoriel Rails Cloud SQL PostgreSQL et son app.yaml, puis comparez la configuration correspondante du tutoriel MySQL. Reproduisez l’échec avec gcloud app deploy et vérifiez que la configuration du runtime utilise un environnement Ubuntu 22 pris en charge ; c’est terminé lorsque les deux tutoriels se déploient correctement sans l’erreur end-of-support.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
google-cloud, mysql, postgresql, rails, ruby
Domaine
cloud, databases, documentation
Type d'issue
Bug
Difficulté
2/5
Temps estimé
1-3 heures
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
48/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.