Skip to content

Fix devcontainer: remove ruby feature redundant with jekyll base image - #187

Draft
fulldecent with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-devcontainer-issues
Draft

Fix devcontainer: remove ruby feature redundant with jekyll base image#187
fulldecent with Copilot wants to merge 1 commit into
mainfrom
copilot/fix-devcontainer-issues

Conversation

Copilot AI commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

The ghcr.io/devcontainers/features/ruby:2 feature fails to install because mcr.microsoft.com/devcontainers/jekyll already ships with Ruby and rbenv — adding the feature causes a conflict at build time (exit code 1).

Changes

  • .devcontainer/devcontainer.json: Remove ghcr.io/devcontainers/features/ruby:2 feature. The postCreateCommand continues to run rbenv install --skip-existing using the rbenv already present in the base image, so .ruby-version remains the single source of truth for the Ruby version.

@fulldecent

Copy link
Copy Markdown
Owner

I loaded this branch in a devcontainer and ...

it did not crash, but.

ruby -v
ruby 3.4.9 (2026-03-11 revision 76cca827ab) +PRISM [x86_64-linux]

whereas the expected .ruby-version is

3.3.4


fix it so it actually uses the .ruby-version


i did a workaround with:

👋 Welcome to Codespaces! You are on a custom image defined in your devcontainer.json file.

🔍 To explore VS Code to its fullest, search using the Command Palette (Cmd/Ctrl + Shift + P)

📝 Edit away, then run your build command to see your code running in the browser.
@fulldecent ➜ /workspaces/github-pages-template (copilot/fix-devcontainer-issues) $ 

@fulldecent ➜ /workspaces/github-pages-template (copilot/fix-devcontainer-issues) $ 
@fulldecent ➜ /workspaces/github-pages-template (copilot/fix-devcontainer-issues) $ ruby -v
@fulldecent ➜ /workspaces/github-pages-template (copilot/fix-devcontainer-issues) $ rbenv
rbenv 1.3.2
Usage: rbenv <command> [<args>...]

Commands to manage available Ruby versions:
   versions    List installed Ruby versions
   install     Install a Ruby version using ruby-build
   uninstall   Uninstall a specific Ruby version
   rehash      Regenerate rbenv shims

Commands to view or change the current Ruby version:
   version     Show the current Ruby version and its origin
   local       Set or show the local application-specific Ruby version
   global      Set or show the global Ruby version
   shell       Set or show the shell-specific Ruby version

See `rbenv help <command>' for information on a specific command.
For full documentation, see: https://github.com/rbenv/rbenv#readme
@fulldecent ➜ /workspaces/github-pages-template (copilot/fix-devcontainer-issues) $ rbenv install
==> Downloading ruby-3.3.4.tar.gz...
-> curl -q -fL -o ruby-3.3.4.tar.gz https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.4.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 21.0M  100 21.0M    0     0  43.2M      0 --:--:-- --:--:-- --:--:-- 43.4M
==> Installing ruby-3.3.4...
-> ./configure "--prefix=$HOME/.rbenv/versions/3.3.4" --enable-shared --with-ext=openssl,psych,+


-> make -j 2
-> make install
==> Installed ruby-3.3.4 to /home/vscode/.rbenv/versions/3.3.4
@fulldecent ➜ /workspaces/github-pages-template (copilot/fix-devcontainer-issues) $
@fulldecent ➜ /workspaces/github-pages-template (copilot/fix-devcontainer-issues) $ 
@fulldecent ➜ /workspaces/github-pages-template (copilot/fix-devcontainer-issues) $ 
@fulldecent ➜ /workspaces/github-pages-template (copilot/fix-devcontainer-issues) $ ruby -v
ruby 3.4.9 (2026-03-11 revision 76cca827ab) +PRISM [x86_64-linux]
@fulldecent ➜ /workspaces/github-pages-template (copilot/fix-devcontainer-issues) $ eval "$(rbenv init -)"
@fulldecent ➜ /workspaces/github-pages-template (copilot/fix-devcontainer-issues) $ ruby -v
ruby 3.3.4 (2024-07-09 revision be1089c8ec) [x86_64-linux]
@fulldecent ➜ /workspaces/github-pages-template (copilot/fix-devcontainer-issues) $ ```

from inside the environment after it loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants