GoogleCloudPlatform / GoogleCloudPlatform/ruby-docs-samples

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

Đang mở
#1,476 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
samples
Ngôn ngữ chính
Ruby
Star
235
Fork
210
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với hướng dẫn Rails Cloud SQL PostgreSQL và app.yaml của nó, sau đó so sánh cấu hình tương ứng của hướng dẫn MySQL. Tái hiện lỗi bằng gcloud app deploy và xác minh rằng cấu hình runtime sử dụng môi trường Ubuntu 22 được hỗ trợ; được xem là hoàn tất khi cả hai hướng dẫn đều triển khai thành công mà không gặp lỗi end-of-support.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
google-cloud, mysql, postgresql, rails, ruby
Lĩnh vực
cloud, databases, documentation
Loại issue
Lỗi
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
48/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.