Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debian image - Ruby feature is broken #496

Closed
exil0867 opened this issue Mar 19, 2023 · 7 comments · Fixed by #505
Closed

Debian image - Ruby feature is broken #496

exil0867 opened this issue Mar 19, 2023 · 7 comments · Fixed by #505
Assignees
Labels
bug Something isn't working

Comments

@exil0867
Copy link
Contributor

I'm encountering an issue where my container fails to build when I add the Ruby feature, but builds successfully when I remove it. I've tried setting the version to the latest and even omitting the version property, but the issue persists. Based on my troubleshooting, I suspect that the problem may be related to the Ruby feature itself.

devcontainer.json

{
  "name": "Node.js & JavaScript",
  "build": {
    "dockerfile": "Dockerfile"
  },
  "features": {
    "ghcr.io/devcontainers/features/common-utils:2": {},
    "ghcr.io/devcontainers/features/desktop-lite:1": {
      "version": "latest",
      "noVncVersion": "1.2.0",
      "webPort": "6080",
      "vncPort": "5901"
    },
    "ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
      "moby": true,
      "installDockerBuildx": true,
      "version": "latest",
      "dockerDashComposeVersion": "v2"
    },
    "ghcr.io/devcontainers/features/ruby:1": {
      "version": "3.0.0"
    },
    "ghcr.io/devcontainers/features/git:1": {
      "ppa": true,
      "version": "os-provided"
    },
    "ghcr.io/devcontainers/features/github-cli:1": {
      "installDirectlyFromGitHubRelease": true,
      "version": "latest"
    },
    "ghcr.io/devcontainers/features/python:1": {
      "installTools": true,
      "version": "latest"
    }
  },
  "forwardPorts": [
    3000,
    6080
  ],
  "postCreateCommand": "bash .devcontainer/post-run.sh",
  "customizations": {
    "vscode": {
      "extensions": [
        "EditorConfig.EditorConfig",
        "dbaeumer.vscode-eslint",
        "esbenp.prettier-vscode",
        "styled-components.vscode-styled-components",
        "dsznajder.es7-react-js-snippets"
      ]
    }
  }
}

Dockerfile:

ARG VARIANT=0-18-bullseye
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:${VARIANT}
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive

Build log:

[2023-03-19T00:51:12.258Z] 
#0 84.55   /usr/local/rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/request_set.rb:271:in `each'
#0 84.55   /usr/local/rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/request_set.rb:271:in `install_into'
[2023-03-19T00:51:12.258Z] #0 84.55   /usr/local/rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/request_set.rb:147:in `install'
#0 84.55   /usr/local/rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/dependency_installer.rb:252:in `install'
[2023-03-19T00:51:12.258Z] #0 84.55   mkrf_conf.rb:31:in `rescue in <main>'
#0 84.55   mkrf_conf.rb:24:in `<main>'
#0 84.55 
[2023-03-19T00:51:12.258Z] 
#0 84.55 rake failed, exit code 1
#0 84.55 
[2023-03-19T00:51:12.258Z] 
#0 84.55 Gem files will remain installed in /usr/local/rvm/gems/ruby-3.0.0/gems/ruby-debug-ide-0.7.3 for inspection.
#0 84.55 Results logged to /usr/local/rvm/gems/ruby-3.0.0/extensions/x86_64-linux/3.0.0/ruby-debug-ide-0.7.3/gem_make.out
[2023-03-19T00:51:12.258Z] 
#0 84.55 1 gem installed
#0 84.56 ERROR: Feature "Ruby (via rvm)" (ghcr.io/devcontainers/features/ruby) failed to install! Look at the documentation at https://github.com/devcontainers/features/tree/main/src/ruby for help troubleshooting this error.
[2023-03-19T00:51:12.258Z] 
------
[2023-03-19T00:51:12.262Z] Dockerfile-with-features:89
--------------------
  88 |     ENV PATH=/usr/local/rvm/gems/default/bin:/usr/local/rvm/gems/default@global/bin:/usr/local/rvm/rubies/default/bin:/usr/local/share/rbenv/bin:${PATH}
  89 | >>> RUN --mount=type=bind,from=dev_containers_feature_content_source,source=ruby_4,target=/tmp/build-features-src/ruby_4 \
  90 | >>>     cp -ar /tmp/build-features-src/ruby_4 /tmp/build-features/ \
  91 | >>>  && chmod -R 0700 /tmp/build-features/ruby_4 \
  92 | >>>  && cd /tmp/build-features/ruby_4 \
  93 | >>>  && chmod +x ./devcontainer-features-install.sh \
  94 | >>>  && ./devcontainer-features-install.sh \
  95 | >>>  && rm -rf /tmp/build-features/ruby_4
  96 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c cp -ar /tmp/build-features-src/ruby_4 /tmp/build-features/  && chmod -R 0700 /tmp/build-features/ruby_4  && cd /tmp/build-features/ruby_4  && chmod +x ./devcontainer-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/build-features/ruby_4" did not complete successfully: exit code: 1
[2023-03-19T00:51:12.468Z] Stop (420020 ms): Run: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-user123/container-features/0.31.0-1679186643845/Dockerfile-with-features -t vsc-project123-ecd8063cb977f3f6661ae68297336f23 --target dev_containers_target_stage --build-context dev_containers_feature_content_source=/tmp/devcontainercli-user123/container-features/0.31.0-1679186643845 --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp /home/user123/data/box/user123/databox/develop/project123/project-next/.devcontainer
[2023-03-19T00:51:12.477Z] Error: Command failed: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-user123/container-features/0.31.0-1679186643845/Dockerfile-with-features -t vsc-project123-ecd8063cb977f3f6661ae68297336f23 --target dev_containers_target_stage --build-context dev_containers_feature_content_source=/tmp/devcontainercli-user123/container-features/0.31.0-1679186643845 --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp /home/user123/data/box/user123/databox/develop/project123/project-next/.devcontainer
[2023-03-19T00:51:12.478Z]     at hie (/home/user123/.vscode-remote-containers/dist/dev-containers-cli-0.282.0/dist/spec-node/devContainersSpecCLI.js:1931:1698)
[2023-03-19T00:51:12.478Z]     at runMicrotasks (<anonymous>)
[2023-03-19T00:51:12.478Z]     at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2023-03-19T00:51:12.478Z]     at async FF (/home/user123/.vscode-remote-containers/dist/dev-containers-cli-0.282.0/dist/spec-node/devContainersSpecCLI.js:1930:3910)
[2023-03-19T00:51:12.478Z]     at async S7 (/home/user123/.vscode-remote-containers/dist/dev-containers-cli-0.282.0/dist/spec-node/devContainersSpecCLI.js:1930:2839)
[2023-03-19T00:51:12.478Z]     at async xie (/home/user123/.vscode-remote-containers/dist/dev-containers-cli-0.282.0/dist/spec-node/devContainersSpecCLI.js:1945:2625)
[2023-03-19T00:51:12.478Z]     at async Wf (/home/user123/.vscode-remote-containers/dist/dev-containers-cli-0.282.0/dist/spec-node/devContainersSpecCLI.js:1945:3750)
[2023-03-19T00:51:12.479Z]     at async noe (/home/user123/.vscode-remote-containers/dist/dev-containers-cli-0.282.0/dist/spec-node/devContainersSpecCLI.js:2069:17325)
[2023-03-19T00:51:12.479Z]     at async roe (/home/user123/.vscode-remote-containers/dist/dev-containers-cli-0.282.0/dist/spec-node/devContainersSpecCLI.js:2069:17066)
[2023-03-19T00:51:12.494Z] Stop (431000 ms): Run in Host: /home/user123/.vscode-remote-containers/bin/e2816fe719a4026ffa1ee0189dc89bdfdbafb164/node /home/user123/.vscode-remote-containers/dist/dev-containers-cli-0.282.0/dist/spec-node/devContainersSpecCLI.js up --container-session-data-folder /tmp/devcontainers-12a74427-1850-4e88-b04a-40eb6d6ae2b81679186626773 --workspace-folder /home/user123/data/box/user123/databox/develop/project123/project-next --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/user123/data/box/user123/databox/develop/project123/project-next --id-label dev
container.config_file=/home/user123/data/box/user123/databox/develop/project123/project-next/.devcontainer/devcontainer.json --log-level debug --log-format json --config /home/user123/data/box/user123/databox/develop/project123/project-next/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[2023-03-19T00:51:12.495Z] Exit code 1
[2023-03-19T00:51:12.496Z] Command failed: /home/user123/.vscode-remote-containers/bin/e2816fe719a4026ffa1ee0189dc89bdfdbafb164/node /home/user123/.vscode-remote-containers/dist/dev-containers-cli-0.282.0/dist/spec-node/devContainersSpecCLI.js up --container-session-data-folder /tmp/devcontainers-12a74427-1850-4e88-b04a-40eb6d6ae2b81679186626773 --workspace-folder /home/user123/data/box/user123/databox/develop/project123/project-next --workspace-mount-consistency cached --id-label devcontainer.local_folder=/home/user123/data/box/user123/databox/develop/project123/project-next --id-labeldevcontainer.config_file=/home/user123/data/box/user123/databox/develop/project123/project-next/.devcontainer/devcontainer.json --log-level debug --log-format json --config /home/user123/data/box/user123/databox/develop/project123/project-next/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true
[2023-03-19T00:51:12.496Z] Exit code 1
@samruddhikhandale
Copy link
Member

Hi 👋

I was able to create and connect to the dev container with your config without any issues. Also, the smoke tests for ruby passes.

image

From your logs, it seems like a temporary issue while installing the rake gem. @exilvm Mind giving a retry?

@exil0867
Copy link
Contributor Author

exil0867 commented Mar 20, 2023

Hello!
It's been failing for over 3 days, i just gave it another try, it still fails.
I'm gonna try building the image in Codespaces instead to make sure the issue is not on my end.

@exil0867
Copy link
Contributor Author

It also failed in Codespaces, here's the log:

2023-03-20 18:29:49.686Z: #23 9.864 RUBY_VERSION=3.0.0
#23 9.864 ./install.sh: line 179: rvm: command not found
#23 9.865 ./install.sh: line 179: [: !=: unary operator expected
#23 9.867 (*) Downloading GPG key...
2023-03-20 18:29:50.436Z: #23 10.67 Turning on ignore dotfiles mode.
#23 10.67 Installing RVM with default_gems: rake ruby-debug-ide.
2023-03-20 18:29:50.737Z: #23 10.89 Downloading https://github.com/rvm/rvm/archive/1.29.12.tar.gz
2023-03-20 18:29:51.641Z: #23 11.81 Downloading https://github.com/rvm/rvm/releases/download/1.29.12/1.29.12.tar.gz.asc
2023-03-20 18:29:52.085Z: #23 12.27 gpg: Signature made Fri Jan 15 18:46:22 2021 UTC
#23 12.27 gpg:                using RSA key 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
#23 12.28 gpg: Good signature from "Piotr Kuczynski <piotr.kuczynski@gmail.com>" [unknown]
#23 12.28 gpg: WARNING: This key is not certified with a trusted signature!
#23 12.28 gpg:          There is no indication that the signature belongs to the owner.
#23 12.28 Primary key fingerprint: 7D2B AF1C F37B 13E2 069D  6956 105B D0E7 3949 9BDB
#23 12.28 GPG verified '/usr/local/rvm/archives/rvm-1.29.12.tgz'
#23 12.38 Installing RVM to /usr/local/rvm/
2023-03-20 18:29:53.841Z: #23 14.13 Installation of RVM in /usr/local/rvm/ is almost complete:
#23 14.13 
#23 14.13   * First you need to add all users that will be using rvm to 'rvm' group,
#23 14.13     and logout - login again, anyone using rvm will be operating with `umask u=rwx,g=rwx,o=rx`.
2023-03-20 18:29:53.991Z: #23 14.13 
#23 14.13   * To start using RVM you need to run `source /etc/profile.d/rvm.sh`
#23 14.13     in all your open shell windows, in rare cases you need to reopen all shell windows.
#23 14.18   * Please do NOT forget to add your users to the <code>rvm</code> group.
#23 14.18      The installer no longer auto-adds root or users to the rvm group. Admins must do this.
#23 14.18      Also, please note that group memberships are ONLY evaluated at login time.
#23 14.18      This means that users must log out then back in before group membership takes effect!
#23 14.20   * WARNING:  version This account is currently not available. detected - Zsh 4.3.12 / 5.0.0+ is recommended,
#23 14.20      with current one errors to be expected - bugs in shell code interpretation.
#23 14.21 <warn>Thanks for installing RVM 🙏</warn>
#23 14.21 Please consider donating to our open collective to help us maintain RVM.
#23 14.21 
#23 14.21 👉  Donate: <code>https://opencollective.com/rvm/donate</code>
#23 14.21 
#23 14.21 
2023-03-20 18:29:54.142Z: #23 14.30 Ruby enVironment Manager 1.29.12 (latest) (c) 2009-2020 Michal Papis, Piotr Kuczynski, Wayne E. Seguin
#23 14.30 
2023-03-20 18:29:54.594Z: #23 14.81 Searching for binary rubies, this might take some time.
2023-03-20 18:29:55.647Z: #23 15.88 Found remote file https://rvm_io.global.ssl.fastly.net/binaries/debian/11/x86_64/ruby-3.0.0.tar.bz2
#23 15.88 Checking requirements for debian.
2023-03-20 18:29:55.913Z: #23 16.14 Requirements installation successful.
#23 16.21 ruby-3.0.0 - #configure
2023-03-20 18:29:56.064Z: #23 16.21 ruby-3.0.0 - #download
#23 16.29   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
#23 16.29                                  Dload  Upload   Total   Spent    Left  Speed
#23 16.29 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     02023-03-20 18:29:56.204Z: 
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     02023-03-20 18:29:57.258Z: 
100 26.2M  100 26.2M    0     0  22.9M      0  0:00:01  0:00:01 --:--:-- 22.9M
#23 17.44 No checksum for downloaded archive, recording checksum in user configuration.
2023-03-20 18:29:57.408Z: #23 17.59 ruby-3.0.0 - #validate archive
2023-03-20 18:30:01.618Z: #23 21.84 ruby-3.0.0 - #extract
2023-03-20 18:30:03.720Z: #23 24.01 ruby-3.0.0 - #validate binary
2023-03-20 18:30:04.162Z: #23 24.45 ruby-3.0.0 - #setup
2023-03-20 18:30:04.713Z: #23 24.91 ruby-3.0.0 - #gemset created /usr/local/rvm/gems/ruby-3.0.0@global
#23 24.97 ruby-3.0.0 - #importing gemset /usr/local/rvm/gemsets/global.gems..................................
2023-03-20 18:30:04.864Z: #23 25.02 ruby-3.0.0 - #generating global wrappers2023-03-20 18:30:05.266Z: ........
#23 25.50 ruby-3.0.0 - #gemset created /usr/local/rvm/gems/ruby-3.0.0
#23 25.56 ruby-3.0.0 - #importing gemset /usr/local/rvm/gemsets/default.gems2023-03-20 18:30:11.986Z: there was an error installing gem ruby-debug-ide
2023-03-20 18:30:12.137Z: #23 32.28 ..................................
#23 32.29 ruby-3.0.0 - #generating default wrappers2023-03-20 18:30:12.589Z: ........
2023-03-20 18:30:12.869Z: #23 33.16 Creating alias default for ruby-3.0.02023-03-20 18:30:13.020Z: ...
#23 33.17 
#23 33.17   * To start using RVM you need to run `source /usr/local/rvm/scripts/rvm`
#23 33.17     in all your open shell windows, in rare cases you need to reopen all shell windows.
2023-03-20 18:30:13.280Z: #23 33.52 Fixing group for :rvm - this might take a few long minutes...
#23 33.57 Fixing rights with 'g+w' - this might take a few long minutes...
2023-03-20 18:30:13.430Z: #23 33.64 Finished fixing.
2023-03-20 18:30:15.082Z: #23 35.37 Successfully installed rake-13.0.6
#23 35.37 Parsing documentation for rake-13.0.6
#23 35.37 Installing ri documentation for rake-13.0.6
#23 35.37 Done installing documentation for rake after 0 seconds
#23 35.37 Building native extensions. This could take a while...
2023-03-20 18:30:19.746Z: #23 39.92 ERROR:  Error installing ruby-debug-ide:
#23 39.92 	ERROR: Failed to build gem native extension.2023-03-20 18:30:19.749Z: 
#23 39.92 
#23 39.92     current directory: /usr/local/rvm/gems/ruby-3.0.0/gems/ruby-debug-ide-0.7.3/ext
#23 39.92 /usr/local/rvm/rubies/ruby-3.0.0/bin/ruby mkrf_conf.rb
#23 39.92 Installing base gem
#23 39.92 Building native extensions. This could take a while...
#23 39.92 Building native extensions. This could take a while...
#23 39.92 ERROR: Failed to build gem native extension.
#23 39.92 
#23 39.92     current directory: /usr/local/rvm/gems/ruby-3.0.0/gems/debase-0.2.5.beta2/ext
#23 39.92 /usr/local/rvm/rubies/ruby-3.0.0/bin/ruby -I /usr/local/rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0 -r ./siteconf20230320-5053-ilehfj.rb extconf.rb
#23 39.92 checking for vm_core.h... no
#23 39.92 checking for vm_core.h... no
#23 39.92 checking for vm_core.h... yes
#23 39.92 checking for iseq.h... yes
#23 39.92 checking for version.h... yes
#23 39.92 creating Makefile
#23 39.92 
#23 39.92 current directory: /usr/local/rvm/gems/ruby-3.0.0/gems/debase-0.2.5.beta2/ext
#23 39.92 make "DESTDIR=" clean
#23 39.92 
#23 39.92 current directory: /usr/local/rvm/gems/ruby-3.0.0/gems/debase-0.2.5.beta2/ext
#23 39.92 make "DESTDIR="
#23 39.92 compiling breakpoint.c
#23 39.92 compiling context.c
#23 39.92 compiling debase_internals.c
#23 39.92 debase_internals.c: In function 'print_debug':
#23 39.92 debase_internals.c:36:3: warning: function 'print_debug' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
#23 39.92    36 |   vfprintf(stderr, message, ap);
#23 39.92       |   ^~~~~~~~
#23 39.92 debase_internals.c: In function 'count_stack_size':
#23 39.92 debase_internals.c:319:37: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
#23 39.92   319 |     rb_control_frame_t *start_cfp = RUBY_VM_END_CONTROL_FRAME(TH_INFO(thread));
#23 39.92       |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~
#23 39.92 In file included from /usr/local/rvm/rubies/ruby-3.0.0/include/ruby-3.0.0/ruby/ruby.h:24,
#23 39.92                  from /usr/local/rvm/rubies/ruby-3.0.0/include/ruby-3.0.0/ruby.h:38,
#23 39.92                  from ./debase_internals.h:4,
#23 39.92                  from debase_internals.c:1:
#23 39.92 debase_internals.c: In function 'Init_debase_internals':
#23 39.92 /usr/local/rvm/rubies/ruby-3.0.0/include/ruby-3.0.0/ruby/internal/anyargs.h:337:142: warning: passing argument 3 of 'rb_define_module_function_01' from incompatible pointer type [-Wincompatible-pointer-types]
#23 39.92   337 | #define rb_define_module_function(mod, mid, func, arity)    RBIMPL_ANYARGS_DISPATCH_rb_define_module_function((arity), (func))((mod), (mid), (func), (arity))
#23 39.92       |                                                                                                                                              ^~~~~~
#23 39.92       |                                                                                                                                              |
#23 39.92       |                                                                                                                                              void (*)(VALUE,  VALUE) {aka void (*)(long unsigned int,  long unsigned int)}
#23 39.92 debase_internals.c:770:3: note: in expansion of macro 'rb_define_module_function'
#23 39.92   770 |   rb_define_module_function(mDebase, "set_trace_flag_to_iseq", Debase_set_trace_flag_to_iseq, 1);
#23 39.92       |   ^~~~~~~~~~~~~~~~~~~~~~~~~
#23 39.92 /usr/local/rvm/rubies/ruby-3.0.0/include/ruby-3.0.0/ruby/internal/anyargs.h:273:21: note: expected 'VALUE (*)(VALUE,  VALUE)' {aka 'long unsigned int (*)(long unsigned int,  long unsigned int)'} but argument is of type 'void (*)(VALUE,  VALUE)' {aka 'void (*)(long unsigned int,  long unsigned int)'}
#23 39.92   273 | RBIMPL_ANYARGS_DECL(rb_define_module_function, VALUE, const char *)
#23 39.92       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~
#23 39.92 /usr/local/rvm/rubies/ruby-3.0.0/include/ruby-3.0.0/ruby/internal/anyargs.h:255:41: note: in definitio2023-03-20 18:30:19.751Z: n of macro 'RBIMPL_ANYARGS_DECL'
#23 39.92   255 | RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _01(__VA_ARGS__, VALUE(*)(VALUE, VALUE), int); \
#23 39.92       |                                         ^~~
#23 39.92 /usr/local/rvm/rubies/ruby-3.0.0/include/ruby-3.0.0/ruby/internal/anyargs.h:337:142: warning: passing argument 3 of 'rb_define_module_function_01' from incompatible pointer type [-Wincompatible-pointer-types]
#23 39.92   337 | #define rb_define_module_function(mod, mid, func, arity)    RBIMPL_ANYARGS_DISPATCH_rb_define_module_function((arity), (func))((mod), (mid), (func), (arity))
#23 39.92       |                                                                                                                                              ^~~~~~
#23 39.92       |                                                                                                                                              |
#23 39.92       |                                                                                                                                              void (*)(VALUE,  VALUE) {aka void (*)(long unsigned int,  long unsigned int)}
#23 39.92 debase_internals.c:773:3: note: in expansion of macro 'rb_define_module_function'
#23 39.92   773 |   rb_define_module_function(mDebase, "unset_iseq_flags", Debase_unset_trace_flags, 1);
#23 39.92       |   ^~~~~~~~~~~~~~~~~~~~~~~~~
#23 39.92 /usr/local/rvm/rubies/ruby-3.0.0/include/ruby-3.0.0/ruby/internal/anyargs.h:273:21: note: expected 'VALUE (*)(VALUE,  VALUE)' {aka 'long unsigned int (*)(long unsigned int,  long unsigned int)'} but argument is of type 'void (*)(VALUE,  VALUE)' {aka 'void (*)(long unsigned int,  long unsigned int)'}
#23 39.92   273 | RBIMPL_ANYARGS_DECL(rb_define_module_function, VALUE, const char *)
#23 39.92       |                     ^~~~~~~~~~~~~~~~~~~~~~~~~
#23 39.92 /usr/local/rvm/rubies/ruby-3.0.0/include/ruby-3.0.0/ruby/internal/anyargs.h:255:41: note: in definition of macro 'RBIMPL_ANYARGS_DECL'
#23 39.92   255 | RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _01(__VA_ARGS__, VALUE(*)(VALUE, VALUE), int); \
#23 39.92       |                                         ^~~
#23 39.92 debase_internals.c: At top level:
#23 39.92 cc1: note: unrecognized command-line option '-Wno-self-assign' may have been intended to silence earlier diagnostics
#23 39.92 cc1: note: unrecognized command-line option '-Wno-parentheses-equality' may have been intended to silence earlier diagnostics
#23 39.92 cc1: note: unrecognized command-line option '-Wno-constant-logical-operand' may have been intended to silence earlier diagnostics
#23 39.92 compiling locker.c
#23 39.92 linking shared-object debase_internals.so
#23 39.92 
#23 39.92 current directory: /usr/local/rvm/gems/ruby-3.0.0/gems/debase-0.2.5.beta2/ext
#23 39.92 make "DESTDIR=" install
#23 39.92 make: /usr/bin/mkdir: No such file or directory
#23 39.92 make: *** [Makefile:202: .sitearchdir.time] Error 127
#23 39.92 
#23 39.92 make install failed, exit code 2
#23 39.92 
#23 39.92 Gem files will remain installed in /usr/local/rvm/gems/ruby-3.0.0/gems/debase-0.2.5.beta2 for inspection.
#23 39.92 Results logged to /usr/local/rvm/gems/ruby-3.0.0/extensions/x86_64-linux/3.0.0/debase-0.2.5.beta2/gem_make.out
#23 39.92 /usr/local/rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/builder.rb:90:in `run'
#23 39.92   /usr/local/rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/builder.rb:42:in `block in make'
#23 39.92   /usr/local/rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/builder.rb:34:in `each'
#23 39.92   /usr/local/rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/builder.rb:34:in `make'
#23 39.92   /usr/local/rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/ext_conf_builder.rb:64:in `block in build'
#23 39.92   /usr/local/rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/tempfile.rb:317:in `open'
#23 39.92   /usr/local/rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/ext_conf_builder.rb:28:in `build'
#23 39.92   /usr/local/rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/b2023-03-20 18:30:19.756Z: uilder.rb:156:in `build_extension'
#23 39.92   /usr/local/rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/builder.rb:190:in `block in build_extensions'
#23 39.92   /usr/local/rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/builder.rb:187:in `each'
#23 39.92   /usr/local/rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/ext/builder.rb:187:in `build_extensions'
#23 39.92   /usr/local/rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/installer.rb:821:in `build_extensions'
#23 39.92   /usr/local/rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/installer.rb:312:in `install'
#23 39.92   /usr/local/rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/resolver/specification.rb:104:in `install'
#23 39.92   /usr/local/rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/request_set.rb:279:in `block in install_into'
#23 39.92   /usr/local/rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/request_set.rb:271:in `each'
#23 39.92   /usr/local/rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/request_set.rb:271:in `install_into'
#23 39.92   /usr/local/rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/request_set.rb:147:in `install'
#23 39.92   /usr/local/rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/dependency_installer.rb:252:in `install'
#23 39.92   mkrf_conf.rb:31:in `rescue in <main>'
#23 39.92   mkrf_conf.rb:24:in `<main>'
#23 39.92 
#23 39.92 rake failed, exit code 1
#23 39.92 
#23 39.92 Gem files will remain installed in /usr/local/rvm/gems/ruby-3.0.0/gems/ruby-debug-ide-0.7.3 for inspection.
#23 39.92 Results logged to /usr/local/rvm/gems/ruby-3.0.0/extensions/x86_64-linux/3.0.0/ruby-debug-ide-0.7.3/gem_make.out
#23 39.93 1 gem installed
#23 39.93 ERROR: Feature "Ruby (via rvm)" (ghcr.io/devcontainers/features/ruby) failed to install! Look at the documentation at https://github.com/devcontainers/features/tree/main/src/ruby for help troubleshooting this error.
2023-03-20 18:30:20.009Z: #23 ERROR: executor failed running [/bin/sh -c cp -ar /tmp/build-features-src/ruby_4 /tmp/dev-container-features  && chmod -R 0755 /tmp/dev-container-features/ruby_4  && cd /tmp/dev-container-features/ruby_4  && chmod +x ./devcontainer-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-container-features/ruby_4]: exit code: 12023-03-20 18:30:20.011Z: 
2023-03-20 18:30:20.014Z: ------
 > [dev_containers_target_stage  9/10] RUN --mount=type=bind,from=dev_containers_feature_content_source,source=ruby_4,target=/tmp/build-features-src/ruby_4     cp -ar /tmp/build-features-src/ruby_4 /tmp/dev-container-features  && chmod -R 0755 /tmp/dev-container-features/ruby_4  && cd /tmp/dev-container-features/ruby_4  && chmod +x ./devcontainer-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-container-features/ruby_4:
#23 39.92   /usr/local/rvm/rubies/ruby-3.0.0/lib/ruby/3.0.0/rubygems/dependency_installer.rb:252:in `install'
#23 39.92   mkrf_conf.rb:31:in `rescue in <main>'2023-03-20 18:30:20.019Z: 
#23 39.92   mkrf_conf.rb:24:in `<main>'
#23 39.92 
#23 39.92 rake failed, exit code 1
#23 39.92 
#23 39.92 Gem files will remain installed in /usr/local/rvm/gems/ruby-3.0.0/gems/ruby-debug-ide-0.7.3 for inspection.
#23 39.92 Results logged to /usr/local/rvm/gems/ruby-3.0.0/extensions/x86_64-linux/3.0.0/ruby-debug-ide-0.7.3/gem_make.out
#23 39.93 1 gem installed
#23 39.93 ERROR: Feature "Ruby (via rvm)" (ghcr.io/devcontainers/features/ruby) failed to install! Look at the documentation at https://github.com/devcontainers/features/tree/main/src/ruby for help troubleshooting this error.
------
2023-03-20 18:30:20.023Z: ERROR: failed to solve: executor failed running [/bin/sh -c cp -ar /tmp/build-features-src/ruby_4 /tmp/dev-container-features  && chmod -R 0755 /tmp/dev-container-features/ruby_4  && cd /tmp/dev-container-features/ruby_4  && chmod +x ./devcontainer-features-install.sh  && ./devcontainer-features-install.sh  && rm -rf /tmp/dev-container-features/ruby_4]: exit code: 1
2023-03-20 18:30:20.027Z: {"outcome":"error","message":"Command failed: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-root/container-features/0.34.0-1679336624600/Dockerfile-with-features -t vsc-codex-next-eec20922715a75b81138f09329c53cf50f28cd0a92ac37964c173a5c839b00c1 --target dev_containers_target_stage --build-context dev_containers_feature_content_source=/tmp/devcontainercli-root/container-features/0.34.0-1679336624600 --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp /var/lib/docker/codespacemount/workspace/codex-next/.devcontainer","description":"An error occurred building the image."}
2023-03-20 18:30:20.030Z: Stop: Run: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-root/container-features/0.34.0-1679336624600/Dockerfile-with-features -t vsc-codex-next-eec20922715a75b81138f09329c53cf50f28cd0a92ac37964c173a5c839b00c1 --target dev_containers_target_stage --build-context dev_containers_feature_content_source=/tmp/devcontainercli-root/container-features/0.34.0-1679336624600 --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp /var/lib/docker/codespacemount/workspace/codex-next/.devcontainer
2023-03-20 18:30:20.033Z: Error: Command failed: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-root/container-features/0.34.0-1679336624600/Dockerfile-with-features -t vsc-codex-next-eec20922715a75b81138f09329c53cf50f28cd0a92ac37964c173a5c839b00c1 --target dev_containers_target_stage --build-context dev_containers_feature_content_source=/tmp/devcontainercli-root/container-features/0.34.0-1679336624600 --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp /var/lib/docker/codespacemount/workspace/codex-next/.devcontainer
2023-03-20 18:30:20.036Z:     at gie (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:1922:1698)
2023-03-20 18:30:20.049Z:     at runMicrotasks (<anonymous>)
2023-03-20 18:30:20.052Z:     at processTicksAndRejections (internal/process/task_queues.js:95:5)
2023-03-20 18:30:20.054Z:     at async xF (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:1921:3917)
2023-03-20 18:30:20.056Z:     at async I7 (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:1921:2836)
2023-03-20 18:30:20.057Z:     at async kie (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:1936:2634)
2023-03-20 18:30:20.058Z:     at async zf (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:1936:3759)
2023-03-20 18:30:20.059Z:     at async uoe (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2060:17560)
2023-03-20 18:30:20.061Z:     at async aoe (/usr/lib/node_modules/@devcontainers/cli/dist/spec-node/devContainersSpecCLI.js:2060:17301)
2023-03-20 18:30:20.062Z: devcontainer process exited with exit code 1

====================================== ERROR ====================================
2023-03-20 18:30:20.063Z: Failed to create container.
=================================================================================
2023-03-20 18:30:20.067Z: Error: Command failed: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-root/container-features/0.34.0-1679336624600/Dockerfile-with-features -t vsc-codex-next-eec20922715a75b81138f09329c53cf50f28cd0a92ac37964c173a5c839b00c1 --target dev_containers_target_stage --build-context dev_containers_feature_content_source=/tmp/devcontainercli-root/container-features/0.34.0-1679336624600 --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label --build-arg _DEV_CONTAINERS_IMAGE_USER=root --build-arg _DEV_CONTAINERS_FEATURE_CONTENT_SOURCE=dev_container_feature_content_temp /var/lib/docker/codespacemount/workspace/codex-next/.devcontainer
2023-03-20 18:30:20.068Z: Error Code: 1302

====================================== ERROR ====================================
2023-03-20 18:30:20.069Z: Container creation failed.
=================================================================================
2023-03-20 18:30:20.076Z: 

===================================== WARNING ===================================
2023-03-20 18:30:20.099Z: Creating recovery container.
=================================================================================

@exil0867
Copy link
Contributor Author

To make things easier, i've created a repository to help debugging the issue, try running Codespaces on it: https://github.com/EXILL-SUARL/ruby-feature-debug.

For me it still failed.
image

@Mulyu
Copy link

Mulyu commented Mar 24, 2023

I have the same problem.
However, I found the following workaround by install.sh implementation.

		"ghcr.io/devcontainers/features/ruby:1": {
			"version": "2.7.3",
			"INSTALL_RUBY_TOOLS": "false",
			"ROOT_GEM": "gem"
		}

@exil0867
Copy link
Contributor Author

I have the same problem. However, I found the following workaround by install.sh implementation.

		"ghcr.io/devcontainers/features/ruby:1": {
			"version": "2.7.3",
			"INSTALL_RUBY_TOOLS": "false",
			"ROOT_GEM": "gem"
		}

It worked! Thanks.

@yokonao
Copy link

yokonao commented Mar 25, 2023

Ruby feature fails depending on base image OS.
ubuntu:focal is used in test, but executing in debian base image lead to fail.

I found the way to reproduce.

# passed (ubuntu:focal used)
$ devcontainer features test -f ruby --skip-scenarios 

# failed (debian)
$ devcontainer features test -f ruby --skip-scenarios -i mcr.microsoft.com/devcontainers/base:bullseye

I expect this issue fixed!

@samruddhikhandale samruddhikhandale self-assigned this Mar 27, 2023
@samruddhikhandale samruddhikhandale added the bug Something isn't working label Mar 27, 2023
@samruddhikhandale samruddhikhandale changed the title Ruby feature is broken Debian image - Ruby feature is broken Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants