From c81e97701ab7fa369a8b01597d865e2b308840b8 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 12 May 2026 01:09:38 +0000 Subject: [PATCH 1/5] Add Ruby versions: 4.0.4 [automated-ruby-update] --- .github/ruby-versions.json | 1 + features/src/ruby/README.md | 2 +- features/src/ruby/devcontainer-feature.json | 4 ++-- features/test/ruby/test.sh | 2 +- features/test/ruby/with_precompiled_rubies.sh | 2 +- features/test/ruby/with_rbenv.sh | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/ruby-versions.json b/.github/ruby-versions.json index e81ada1..bbed52e 100644 --- a/.github/ruby-versions.json +++ b/.github/ruby-versions.json @@ -1,4 +1,5 @@ [ + "4.0.4", "4.0.3", "4.0.2", "4.0.1", diff --git a/features/src/ruby/README.md b/features/src/ruby/README.md index 027dd37..d56921e 100644 --- a/features/src/ruby/README.md +++ b/features/src/ruby/README.md @@ -54,7 +54,7 @@ When using `mise`, this feature keeps `ruby.compile=true` by default so Ruby is | Options Id | Description | Type | Default Value | |-----|-----|-----|-----| -| version | The version of ruby to be installed | string | 4.0.3 | +| version | The version of ruby to be installed | string | 4.0.4 | | versionManager | The version manager to use for Ruby (mise or rbenv) | string | mise | | usePrecompiledRubies | Use precompiled Rubies with mise when available | boolean | false | diff --git a/features/src/ruby/devcontainer-feature.json b/features/src/ruby/devcontainer-feature.json index 0dcdc5c..4cc7482 100644 --- a/features/src/ruby/devcontainer-feature.json +++ b/features/src/ruby/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "ruby", - "version": "2.2.1", + "version": "2.2.2", "name": "Ruby", "description": "Installs Ruby and a version manager (mise or rbenv) along with libraries needed to build Ruby.", "documentationURL": "https://github.com/rails/devcontainer/tree/main/features/src/ruby", @@ -19,7 +19,7 @@ "options": { "version": { "type": "string", - "default": "4.0.3", + "default": "4.0.4", "description": "The ruby version to be installed" }, "versionManager": { diff --git a/features/test/ruby/test.sh b/features/test/ruby/test.sh index b607045..a049d7c 100644 --- a/features/test/ruby/test.sh +++ b/features/test/ruby/test.sh @@ -9,6 +9,6 @@ check "mise init is sourced in the bashrc" bash -c "grep 'eval \"\$(~/.local/bin check "mise is configured to compile Ruby from source by default" bash -c "mise settings | grep ruby.compile | grep true" check "mise idiomatic version file is enabled for ruby" bash -c "mise settings | grep idiomatic_version_file_enable_tools | grep ruby" check "Ruby is installed with YJIT" bash -c "RUBY_YJIT_ENABLE=1 ruby -v | grep +YJIT" -check "Ruby version is set to 4.0.3" bash -c "mise use -g ruby | grep 4.0.3" +check "Ruby version is set to 4.0.4" bash -c "mise use -g ruby | grep 4.0.4" reportResults diff --git a/features/test/ruby/with_precompiled_rubies.sh b/features/test/ruby/with_precompiled_rubies.sh index b92753a..a9a7244 100644 --- a/features/test/ruby/with_precompiled_rubies.sh +++ b/features/test/ruby/with_precompiled_rubies.sh @@ -8,6 +8,6 @@ check "mise is installed" bash -c "mise --version" check "mise uses precompiled Rubies when enabled" bash -c "mise settings | grep ruby.compile | grep false" check "mise idiomatic version file is enabled for ruby" bash -c "mise settings | grep idiomatic_version_file_enable_tools | grep ruby" check "Ruby is installed with YJIT" bash -c "RUBY_YJIT_ENABLE=1 ruby -v | grep +YJIT" -check "Ruby version is set to 4.0.3" bash -c "mise use -g ruby | grep 4.0.3" +check "Ruby version is set to 4.0.4" bash -c "mise use -g ruby | grep 4.0.4" reportResults diff --git a/features/test/ruby/with_rbenv.sh b/features/test/ruby/with_rbenv.sh index d58040c..9220883 100644 --- a/features/test/ruby/with_rbenv.sh +++ b/features/test/ruby/with_rbenv.sh @@ -9,6 +9,6 @@ check "rbenv is installed" bash -c "rbenv --version" check "ruby-build is installed" bash -c "ls -l $HOME/.rbenv/plugins/ruby-build | grep '\-> /usr/local/share/ruby-build'" eval "$(rbenv init -)" check "Ruby is installed with YJIT" bash -c "RUBY_YJIT_ENABLE=1 ruby -v | grep +YJIT" -check "Ruby version is set to 4.0.3" bash -c "rbenv global | grep 4.0.3" +check "Ruby version is set to 4.0.4" bash -c "rbenv global | grep 4.0.4" reportResults From e44bd628be7fc836c77310f39f972c3decc32f1c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 12 May 2026 22:48:17 +0000 Subject: [PATCH 2/5] Record reproduction before Ruby doc fix Agent-Logs-Url: https://github.com/rails/devcontainer/sessions/1837d2fa-6c84-4e73-b77b-e98819020a0e Co-authored-by: rafaelfranca <47848+rafaelfranca@users.noreply.github.com> --- package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 14dc319..60aa31a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "ruby-version-script", + "name": "rails-devcontainer-features", "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "ruby-version-script", + "name": "rails-devcontainer-features", "version": "1.0.0", "devDependencies": { "@devcontainers/cli": ">= 0.84" From cef2bc695da9b36dbd7769e7b95d35e8b2be21b5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 12 May 2026 22:50:04 +0000 Subject: [PATCH 3/5] Disable install docs during Ruby builds Agent-Logs-Url: https://github.com/rails/devcontainer/sessions/1837d2fa-6c84-4e73-b77b-e98819020a0e Co-authored-by: rafaelfranca <47848+rafaelfranca@users.noreply.github.com> --- features/src/ruby/install.sh | 4 ++-- package-lock.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/features/src/ruby/install.sh b/features/src/ruby/install.sh index db1ed07..d064078 100755 --- a/features/src/ruby/install.sh +++ b/features/src/ruby/install.sh @@ -77,7 +77,7 @@ install_ruby_rbenv() { _user="$1" _version="$2" - su "$_user" -c "/usr/local/share/rbenv/bin/rbenv install $_version" + su "$_user" -c "RUBY_CONFIGURE_OPTS='--disable-install-doc' /usr/local/share/rbenv/bin/rbenv install $_version" su "$_user" -c "/usr/local/share/rbenv/bin/rbenv global $_version" } @@ -114,7 +114,7 @@ install_ruby_mise() { _home_dir="/home/$_user" fi - su "$_user" -c "$_home_dir/.local/bin/mise install ruby@$_version" + su "$_user" -c "RUBY_CONFIGURE_OPTS='--disable-install-doc' $_home_dir/.local/bin/mise install ruby@$_version" su "$_user" -c "$_home_dir/.local/bin/mise use -g ruby@$_version" su "$_user" -c "$_home_dir/.local/bin/mise settings add idiomatic_version_file_enable_tools ruby" } diff --git a/package-lock.json b/package-lock.json index 60aa31a..14dc319 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "rails-devcontainer-features", + "name": "ruby-version-script", "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "rails-devcontainer-features", + "name": "ruby-version-script", "version": "1.0.0", "devDependencies": { "@devcontainers/cli": ">= 0.84" From 19f5c8d4489197ef4ba12e908904a4c3ec9cbfbd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 13 May 2026 08:08:41 +0000 Subject: [PATCH 4/5] Limit Ruby doc workaround to 4.0.4 Agent-Logs-Url: https://github.com/rails/devcontainer/sessions/599a0756-c64a-4e66-9b09-97bf987809a4 Co-authored-by: rafaelfranca <47848+rafaelfranca@users.noreply.github.com> --- features/src/ruby/install.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/features/src/ruby/install.sh b/features/src/ruby/install.sh index d064078..7e483b6 100755 --- a/features/src/ruby/install.sh +++ b/features/src/ruby/install.sh @@ -77,7 +77,11 @@ install_ruby_rbenv() { _user="$1" _version="$2" - su "$_user" -c "RUBY_CONFIGURE_OPTS='--disable-install-doc' /usr/local/share/rbenv/bin/rbenv install $_version" + if [ "$_version" = "4.0.4" ]; then + su "$_user" -c "RUBY_CONFIGURE_OPTS='--disable-install-doc' /usr/local/share/rbenv/bin/rbenv install $_version" + else + su "$_user" -c "/usr/local/share/rbenv/bin/rbenv install $_version" + fi su "$_user" -c "/usr/local/share/rbenv/bin/rbenv global $_version" } @@ -114,7 +118,11 @@ install_ruby_mise() { _home_dir="/home/$_user" fi - su "$_user" -c "RUBY_CONFIGURE_OPTS='--disable-install-doc' $_home_dir/.local/bin/mise install ruby@$_version" + if [ "$_version" = "4.0.4" ]; then + su "$_user" -c "RUBY_CONFIGURE_OPTS='--disable-install-doc' $_home_dir/.local/bin/mise install ruby@$_version" + else + su "$_user" -c "$_home_dir/.local/bin/mise install ruby@$_version" + fi su "$_user" -c "$_home_dir/.local/bin/mise use -g ruby@$_version" su "$_user" -c "$_home_dir/.local/bin/mise settings add idiomatic_version_file_enable_tools ruby" } From 1518c5e040e13494686f1855b638260c35510ccf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 13 May 2026 08:17:19 +0000 Subject: [PATCH 5/5] Deduplicate Ruby doc workaround Agent-Logs-Url: https://github.com/rails/devcontainer/sessions/07591f78-fd4c-459b-a3dc-6bbed5e8fe5c Co-authored-by: rafaelfranca <47848+rafaelfranca@users.noreply.github.com> --- features/src/ruby/install.sh | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/features/src/ruby/install.sh b/features/src/ruby/install.sh index 7e483b6..7673ae7 100755 --- a/features/src/ruby/install.sh +++ b/features/src/ruby/install.sh @@ -72,17 +72,26 @@ setup_rbenv() { add_to_shell_init "$_user" 'eval "$(rbenv init -)"' } -# Function to install Ruby with rbenv -install_ruby_rbenv() { +run_ruby_install_command() { _user="$1" _version="$2" + _command="$3" + _configure_opts="" if [ "$_version" = "4.0.4" ]; then - su "$_user" -c "RUBY_CONFIGURE_OPTS='--disable-install-doc' /usr/local/share/rbenv/bin/rbenv install $_version" - else - su "$_user" -c "/usr/local/share/rbenv/bin/rbenv install $_version" + _configure_opts="RUBY_CONFIGURE_OPTS='--disable-install-doc' " fi - su "$_user" -c "/usr/local/share/rbenv/bin/rbenv global $_version" + + su "$_user" -c "${_configure_opts}${_command}" +} + +# Function to install Ruby with rbenv +install_ruby_rbenv() { + _user="$1" + _version="$2" + + run_ruby_install_command "$_user" "$_version" "/usr/local/share/rbenv/bin/rbenv install \"$_version\"" + su "$_user" -c "/usr/local/share/rbenv/bin/rbenv global \"$_version\"" } # Function to setup mise @@ -118,12 +127,8 @@ install_ruby_mise() { _home_dir="/home/$_user" fi - if [ "$_version" = "4.0.4" ]; then - su "$_user" -c "RUBY_CONFIGURE_OPTS='--disable-install-doc' $_home_dir/.local/bin/mise install ruby@$_version" - else - su "$_user" -c "$_home_dir/.local/bin/mise install ruby@$_version" - fi - su "$_user" -c "$_home_dir/.local/bin/mise use -g ruby@$_version" + run_ruby_install_command "$_user" "$_version" "$_home_dir/.local/bin/mise install \"ruby@$_version\"" + su "$_user" -c "$_home_dir/.local/bin/mise use -g \"ruby@$_version\"" su "$_user" -c "$_home_dir/.local/bin/mise settings add idiomatic_version_file_enable_tools ruby" }