diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 6476170..7f9454b 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -7,11 +7,6 @@ "name": "Jekyll", "image": "mcr.microsoft.com/devcontainers/jekyll", "features": { - // Install rbenv (no Ruby yet); postCreateCommand installs the version from .ruby-version - "ghcr.io/devcontainers/features/ruby:2": { - "version": "none", - "versionManager": "rbenv" - }, // Install nvm (no Node yet); postCreateCommand installs the version from .nvmrc "ghcr.io/devcontainers/features/node:2": { "version": "none", @@ -20,7 +15,8 @@ } }, // Ruby and Node versions come from .ruby-version and .nvmrc (single source of truth, shared with CI) - "postCreateCommand": "/bin/bash -c 'set -e; rbenv install --skip-existing; rbenv rehash; source \"$NVM_DIR/nvm.sh\"; nvm install; nvm use; npm install -g corepack; corepack enable; corepack prepare yarn@4.18.0 --activate; yarn install --immutable; bundle install'", + // We depend on the Jekyll image having RVM + ruby-build installed + "postCreateCommand": "bash -lc 'set -e; source /usr/local/rvm/scripts/rvm; rvm install \"$(tr -d \"[:space:]\" < .ruby-version)\"; rvm use \"$(tr -d \"[:space:]\" < .ruby-version)\" --default; . \"$NVM_DIR/nvm.sh\"; nvm install; nvm use; npm install -g corepack; corepack enable; corepack install; yarn install --immutable; bundle install'", "customizations": { "vscode": { "extensions": ["html-validate.vscode-html-validate"]