From 10266ae588cb96440172b6b6fc47a2fd56b421c6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 28 Aug 2026 07:43:06 +0000 Subject: [PATCH 1/5] Initial plan From d695d390df8b6afcac3e6ffdb7d32c0706471dd2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 28 Aug 2026 07:46:10 +0000 Subject: [PATCH 2/5] Sync ruby & ruby-rails-postgres templates to ruby image v4 Co-authored-by: Kaniska244 <186041440+Kaniska244@users.noreply.github.com> --- src/ruby-rails-postgres/.devcontainer/Dockerfile | 2 +- src/ruby-rails-postgres/devcontainer-template.json | 12 ++++++------ src/ruby/.devcontainer/devcontainer.json | 2 +- src/ruby/devcontainer-template.json | 14 +++++++------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/ruby-rails-postgres/.devcontainer/Dockerfile b/src/ruby-rails-postgres/.devcontainer/Dockerfile index dd84a119..e632973e 100644 --- a/src/ruby-rails-postgres/.devcontainer/Dockerfile +++ b/src/ruby-rails-postgres/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/devcontainers/ruby:3-${templateOption:imageVariant} +FROM mcr.microsoft.com/devcontainers/ruby:4-${templateOption:imageVariant} # Install Rails RUN su vscode -c "gem install rails webdrivers" diff --git a/src/ruby-rails-postgres/devcontainer-template.json b/src/ruby-rails-postgres/devcontainer-template.json index 0c90e41e..071abe93 100644 --- a/src/ruby-rails-postgres/devcontainer-template.json +++ b/src/ruby-rails-postgres/devcontainer-template.json @@ -1,6 +1,6 @@ { "id": "ruby-rails-postgres", - "version": "6.0.1", + "version": "6.0.2", "name": "Ruby on Rails & Postgres", "description": "Develop Ruby on Rails applications with Postgres. Includes a Rails application container and PostgreSQL server.", "documentationURL": "https://github.com/devcontainers/templates/tree/main/src/ruby-rails-postgres", @@ -11,17 +11,17 @@ "type": "string", "description": "Ruby version (use - trixie, -bookworm, -bullseye variants on local arm64/Apple Silicon):", "proposals": [ - "4-trixie", + "4.0-trixie", "3.4-trixie", "3.3-trixie", - "4-bookworm", + "4.0-bookworm", "3.4-bookworm", "3.3-bookworm", - "3.4-bullseye", + "3.4-bullseye", "3.3-bullseye" ], - "default": "4-trixie" - } + "default": "4.0-trixie" + } }, "platforms": ["Ruby"], "optionalPaths": [ diff --git a/src/ruby/.devcontainer/devcontainer.json b/src/ruby/.devcontainer/devcontainer.json index 3f642645..cf0609c5 100644 --- a/src/ruby/.devcontainer/devcontainer.json +++ b/src/ruby/.devcontainer/devcontainer.json @@ -3,7 +3,7 @@ { "name": "Ruby", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/ruby:3-${templateOption:imageVariant}" + "image": "mcr.microsoft.com/devcontainers/ruby:4-${templateOption:imageVariant}" // Features to add to the dev container. More info: https://containers.dev/features. // "features": {}, diff --git a/src/ruby/devcontainer-template.json b/src/ruby/devcontainer-template.json index 3edd7838..8730ce13 100644 --- a/src/ruby/devcontainer-template.json +++ b/src/ruby/devcontainer-template.json @@ -1,6 +1,6 @@ { "id": "ruby", - "version": "6.0.1", + "version": "6.0.2", "name": "Ruby", "description": "Develop Ruby based applications. includes everything you need to get up and running.", "documentationURL": "https://github.com/devcontainers/templates/tree/main/src/ruby", @@ -11,16 +11,16 @@ "type": "string", "description": "Ruby version (use -trixie, -bookworm, -bullseye variants on local arm64/Apple Silicon):", "proposals": [ - "4-trixie", - "3.4-trixie", + "4.0-trixie", + "3.4-trixie", "3.3-trixie", - "4-bookworm", - "3.4-bookworm", + "4.0-bookworm", + "3.4-bookworm", "3.3-bookworm", - "3.4-bullseye", + "3.4-bullseye", "3.3-bullseye" ], - "default": "4-trixie" + "default": "4.0-trixie" } }, "platforms": ["Ruby"], From 8930e4a5f1c665eeb1794f806f359f96aebf2e7d Mon Sep 17 00:00:00 2001 From: Kaniska Date: Fri, 28 Aug 2026 08:50:18 +0000 Subject: [PATCH 3/5] Fix tests by removing invalid rvm dependency --- src/ruby-rails-postgres/.devcontainer/Dockerfile | 1 - test/ruby-rails-postgres/test.sh | 2 -- test/universal/test.sh | 9 +++++---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/ruby-rails-postgres/.devcontainer/Dockerfile b/src/ruby-rails-postgres/.devcontainer/Dockerfile index e632973e..69711506 100644 --- a/src/ruby-rails-postgres/.devcontainer/Dockerfile +++ b/src/ruby-rails-postgres/.devcontainer/Dockerfile @@ -2,7 +2,6 @@ FROM mcr.microsoft.com/devcontainers/ruby:4-${templateOption:imageVariant} # Install Rails RUN su vscode -c "gem install rails webdrivers" -RUN su vscode -c "/usr/local/rvm/bin/rvm fix-permissions" # Default value to allow debug server to serve content over GitHub Codespace's port forwarding service # The value is a comma-separated list of allowed domains diff --git a/test/ruby-rails-postgres/test.sh b/test/ruby-rails-postgres/test.sh index 99e4d900..f78a9dbe 100755 --- a/test/ruby-rails-postgres/test.sh +++ b/test/ruby-rails-postgres/test.sh @@ -14,8 +14,6 @@ checkCommon # Run devcontainer specific tests check "rails" rails --version check "rails installation path" gem which rails -check "user has write permission to rvm gems" [ -w /usr/local/rvm/gems ] -check "user has write permission to rvm gems default" [ -w /usr/local/rvm/gems/default ] check "user can install gems" gem install github-markup check "gem command works" gem --version check "user can install gems" gem install github-markup diff --git a/test/universal/test.sh b/test/universal/test.sh index 0a89f932..9cdb11f9 100755 --- a/test/universal/test.sh +++ b/test/universal/test.sh @@ -53,15 +53,16 @@ echo $(echo "java versions" && ls -a /usr/local/sdkman/candidates/java) # Check Ruby tools check "ruby" ruby --version -check "rvm" bash -c ". /usr/local/rvm/scripts/rvm && rvm --version" +check "ruby-build" ruby-build --version check "rbenv" bash -c 'eval "$(rbenv init -)" && rbenv --version' check "gems" gem --version check "rake" rake --version check "jekyll" jekyll --version -count=$(ls /usr/local/rvm/gems | wc -l) -expectedCount=6 # 2 version folders + 2 global folders for each version + 1 default folder which links to either one of the version + 1 cache folder +check "ruby gems are writable" test -w "$(gem env gemdir)" +count=$(find /usr/local/rubies -mindepth 1 -maxdepth 1 -type d | wc -l) +expectedCount=2 checkVersionCount "two versions of ruby are present" $count $expectedCount -echo $(echo "ruby versions" && ls -a /usr/local/rvm/rubies) +echo $(echo "ruby versions" && ls -a /usr/local/rubies) # Node.js check "node" node --version From 745fcfb7ca475ceefdbf5d31eb74548873959e56 Mon Sep 17 00:00:00 2001 From: Kaniska Date: Fri, 28 Aug 2026 09:04:59 +0000 Subject: [PATCH 4/5] Further fixes for tests --- src/ruby-rails-postgres/.devcontainer/Dockerfile | 1 + test/universal/test.sh | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ruby-rails-postgres/.devcontainer/Dockerfile b/src/ruby-rails-postgres/.devcontainer/Dockerfile index 69711506..77389c2a 100644 --- a/src/ruby-rails-postgres/.devcontainer/Dockerfile +++ b/src/ruby-rails-postgres/.devcontainer/Dockerfile @@ -2,6 +2,7 @@ FROM mcr.microsoft.com/devcontainers/ruby:4-${templateOption:imageVariant} # Install Rails RUN su vscode -c "gem install rails webdrivers" +RUN chown -R vscode:vscode "$GEM_HOME" # Default value to allow debug server to serve content over GitHub Codespace's port forwarding service # The value is a comma-separated list of allowed domains diff --git a/test/universal/test.sh b/test/universal/test.sh index 9cdb11f9..9604fae7 100755 --- a/test/universal/test.sh +++ b/test/universal/test.sh @@ -54,7 +54,6 @@ echo $(echo "java versions" && ls -a /usr/local/sdkman/candidates/java) # Check Ruby tools check "ruby" ruby --version check "ruby-build" ruby-build --version -check "rbenv" bash -c 'eval "$(rbenv init -)" && rbenv --version' check "gems" gem --version check "rake" rake --version check "jekyll" jekyll --version @@ -67,7 +66,6 @@ echo $(echo "ruby versions" && ls -a /usr/local/rubies) # Node.js check "node" node --version check "nvm" bash -c ". /usr/local/share/nvm/nvm.sh && nvm --version" -check "nvs" bash -c ". /usr/local/nvs/nvs.sh && nvs --version" check "yarn" yarn --version check "npm" npm --version count=$(ls /usr/local/share/nvm/versions/node | wc -l) From 53d627c7f015303a78216796f4435aba894cd970 Mon Sep 17 00:00:00 2001 From: Kaniska Date: Fri, 28 Aug 2026 09:29:02 +0000 Subject: [PATCH 5/5] Fixing permission --- src/ruby-rails-postgres/.devcontainer/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ruby-rails-postgres/.devcontainer/Dockerfile b/src/ruby-rails-postgres/.devcontainer/Dockerfile index 77389c2a..096df332 100644 --- a/src/ruby-rails-postgres/.devcontainer/Dockerfile +++ b/src/ruby-rails-postgres/.devcontainer/Dockerfile @@ -2,7 +2,11 @@ FROM mcr.microsoft.com/devcontainers/ruby:4-${templateOption:imageVariant} # Install Rails RUN su vscode -c "gem install rails webdrivers" -RUN chown -R vscode:vscode "$GEM_HOME" +RUN groupadd --system rubygems \ + && usermod --append --groups rubygems vscode \ + && chgrp -R rubygems "$GEM_HOME" \ + && chmod -R g+rwX "$GEM_HOME" \ + && find "$GEM_HOME" -type d -exec chmod g+s {} + # Default value to allow debug server to serve content over GitHub Codespace's port forwarding service # The value is a comma-separated list of allowed domains