GoogleCloudPlatform / GoogleCloudPlatform/ruby-docs-samples

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

オープン
#1,476 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
samples
主要言語
Ruby
スター
235
フォーク
210
PR マージ指標
30日以内にマージされた PR はありません

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Rails Cloud SQL PostgreSQL チュートリアルとその app.yaml から始め、対応する MySQL チュートリアルの設定と比較します。gcloud app deploy で失敗を再現し、ランタイム設定がサポート対象の Ubuntu 22 環境を使用していることを確認します。完了の条件は、両方のチュートリアルが end-of-support エラーなしで正常にデプロイできることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
google-cloud, mysql, postgresql, rails, ruby
領域
cloud, databases, documentation
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。