scripts/docker-build.sh fails with `conflicting_dependencies': undefined method `request' for nil:NilClass (NoMethodError)
Open
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 301
- Forks
- 597
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 62
Description
I'm trying to follow the Docker instructions at https://github.com/duckdb/duckdb-web/blob/main/BUILDING.md#using-docker, but running into what look like version issues:
./scripts/docker-build.sh
+++ dirname ./scripts/docker-build.sh
++ cd ./scripts
++ pwd
+ cd /Users/humphd/repos/duckdb-web/scripts/..
+ . scripts/docker-vars.sh
++ JEKYLL_DOCKER_IMAGE_NAME=duckdb-web-jekyll-img
++ JEKYLL_DOCKER_CONTAINER_NAME=duckdb-web-jekyll
++ id -u
++ id -un
++ id -g
++ id -gn
+ docker build . --tag duckdb-web-jekyll-img --build-arg UID=501 --build-arg UNAME=humphd --build-arg GID=20 --build-arg GNAME=staff
[+] Building 1.0s (12/12) FINISHED docker:desktop-linux
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 536B 0.0s
=> [internal] load metadata for docker.io/rockstorm/jekyll:pages-v228-minimal 0.1s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 76B 0.0s
=> [1/8] FROM docker.io/rockstorm/jekyll:pages-v228-minimal@sha256:c60506da0222300cdb2a68e5a3372743b64591377c503dae6a4909a8efc0a8e5 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 61B 0.0s
=> CACHED [2/8] RUN apk add --update gcc g++ make ruby-bundler linux-headers 0.0s
=> CACHED [3/8] RUN groupadd -g 20 -o staff 0.0s
=> CACHED [4/8] RUN useradd -m -u 501 -g 20 -o -s /bin/bash humphd 0.0s
=> CACHED [5/8] RUN mkdir /app && chown humphd:staff /app 0.0s
=> CACHED [6/8] COPY --chown=humphd:staff Gemfile /app 0.0s
=> CACHED [7/8] COPY --chown=humphd:staff Gemfile.lock /app 0.0s
=> ERROR [8/8] RUN cd /app && bundle config set --local path /home/humphd/.gem && bundle install 0.8s
------
> [8/8] RUN cd /app && bundle config set --local path /home/humphd/.gem && bundle install:
0.212 Bundler 2.4.6 is running, but your lockfile was generated with 2.7.2. Installing Bundler 2.7.2 and restarting using that version.
0.682 Fetching gem metadata from https://rubygems.org/.
0.697 Fetching bundler 2.7.2
0.759 Installing bundler 2.7.2
0.824 /usr/local/lib/ruby/site_ruby/3.1.0/rubygems/resolver/conflict.rb:47:in `conflicting_dependencies': undefined method `request' for nil:NilClass (NoMethodError)
0.824
0.824 [@failed_dep.dependency, @activated.request.dependency]
0.824 ^^^^^^^^
0.824 from /usr/local/lib/ruby/site_ruby/3.1.0/rubygems/exceptions.rb:61:in `conflicting_dependencies'
0.824 from /usr/local/lib/ruby/site_ruby/3.1.0/rubygems/exceptions.rb:55:in `initialize'
0.824 from /usr/local/lib/ruby/site_ruby/3.1.0/rubygems/resolver.rb:193:in `exception'
0.824 from /usr/local/lib/ruby/site_ruby/3.1.0/rubygems/resolver.rb:193:in `raise'
0.824 from /usr/local/lib/ruby/site_ruby/3.1.0/rubygems/resolver.rb:193:in `rescue in resolve'
0.824 from /usr/local/lib/ruby/site_ruby/3.1.0/rubygems/resolver.rb:191:in `resolve'
0.824 from /usr/local/lib/ruby/site_ruby/3.1.0/rubygems/request_set.rb:411:in `resolve'
0.824 from /usr/local/lib/ruby/site_ruby/3.1.0/rubygems/request_set.rb:423:in `resolve_current'
0.824 from /usr/local/lib/ruby/site_ruby/3.1.0/rubygems.rb:228:in `finish_resolve'
0.824 from /usr/local/lib/ruby/site_ruby/3.1.0/rubygems.rb:285:in `block in activate_bin_path'
0.824 from /usr/local/lib/ruby/site_ruby/3.1.0/rubygems.rb:283:in `synchronize'
0.824 from /usr/local/lib/ruby/site_ruby/3.1.0/rubygems.rb:283:in `activate_bin_path'
0.824 from /usr/local/bin/bundle:25:in `<main>'
0.824 /usr/local/lib/ruby/site_ruby/3.1.0/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:317:in `raise_error_unless_state': Unable to satisfy the following requirements: (Gem::Resolver::Molinillo::VersionConflict)
0.824
0.824 - `bundler (= 2.7.2)` required by `user-specified dependency`
0.824 from /usr/local/lib/ruby/site_ruby/3.1.0/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:299:in `block in unwind_for_conflict'
0.824 from <internal:kernel>:90:in `tap'
0.824 from /usr/local/lib/ruby/site_ruby/3.1.0/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:297:in `unwind_for_conflict'
0.824 from /usr/local/lib/ruby/site_ruby/3.1.0/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:682:in `attempt_to_activate'
0.824 from /usr/local/lib/ruby/site_ruby/3.1.0/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:254:in `process_topmost_state'
0.824 from /usr/local/lib/ruby/site_ruby/3.1.0/rubygems/resolver/molinillo/lib/molinillo/resolution.rb:182:in `resolve'
0.824 from /usr/local/lib/ruby/site_ruby/3.1.0/rubygems/resolver/molinillo/lib/molinillo/resolver.rb:43:in `resolve'
0.824 from /usr/local/lib/ruby/site_ruby/3.1.0/rubygems/resolver.rb:190:in `resolve'
0.824 from /usr/local/lib/ruby/site_ruby/3.1.0/rubygems/request_set.rb:411:in `resolve'
0.824 from /usr/local/lib/ruby/site_ruby/3.1.0/rubygems/request_set.rb:423:in `resolve_current'
0.824 from /usr/local/lib/ruby/site_ruby/3.1.0/rubygems.rb:228:in `finish_resolve'
0.824 from /usr/local/lib/ruby/site_ruby/3.1.0/rubygems.rb:285:in `block in activate_bin_path'
0.824 from /usr/local/lib/ruby/site_ruby/3.1.0/rubygems.rb:283:in `synchronize'
0.824 from /usr/local/lib/ruby/site_ruby/3.1.0/rubygems.rb:283:in `activate_bin_path'
0.824 from /usr/local/bin/bundle:25:in `<main>'
------
Dockerfile:18
--------------------
16 | COPY --chown=$UNAME:$GNAME Gemfile /app
17 | COPY --chown=$UNAME:$GNAME Gemfile.lock /app
18 | >>> RUN cd /app && bundle config set --local path /home/$UNAME/.gem && bundle install
19 |
20 | EXPOSE 4000
--------------------
ERROR: failed to build: failed to solve: process "/bin/sh -c cd /app && bundle config set --local path /home/$UNAME/.gem && bundle install" did not complete successfully: exit code: 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with BUILDING.md's Docker instructions, scripts/docker-build.sh, Dockerfile line 18, and the checked-in Gemfile.lock. Reproduce the failure with ./scripts/docker-build.sh and inspect the Bundler and Ruby versions shown in the build log. Done means the Docker image builds successfully using the documented command.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, ruby, shell
- Domain
- build-system, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100