docker-github-pages icon indicating copy to clipboard operation
docker-github-pages copied to clipboard

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/spec_set.rb:87:in `block in materialize': Could not find blankslate-2.1.2.4 in any of the sources (Bundler::GemNotFound)

Open goochjs opened this issue 8 years ago • 2 comments

This looks similar to https://github.com/Starefossen/docker-github-pages/issues/11 but I'm struggling to work through the dependencies to resolve it.

When I run the following command:-

docker run -t --rm -v ${PWD}:/usr/src/app -p "4000:4000" starefossen/github-pages

I get the following error:-

/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/spec_set.rb:87:in `block in materialize': Could not find blankslate-2.1.2.4 in any of the sources (Bundler::GemNotFound)

I tried adding blankslate to the list of gems in the Dockerfile but then it complains about other dependencies. I worked up the chain until I had a Dockerfile like the one below but it seems to be an endless chain of dependencies (the Dockerfile below complains about classifier-reborn missing) and I'm sure there must be an easier way to resolve it.

FROM starefossen/ruby-node:2-6-alpine

ENV GITHUB_GEM_VERSION 160
ENV JSON_GEM_VERSION 1.8.6
ENV MINITEST_GEM_VERSION 5.10.2
ENV BLANKSLATE_GEM_VERSION 2.1.2.4
ENV HITIMES_GEM_VERSION 1.2.2
ENV TIMERS_GEM_VERSION 4.0.1
ENV CELLULOID_GEM_VERSION 0.16.0
ENV FASTSTEMMER_GEM_VERSION 1.0.2

RUN apk --update add --virtual build_deps \
    build-base ruby-dev libc-dev linux-headers \
  && gem install --verbose --no-document \
    json:${JSON_GEM_VERSION} \
    github-pages:${GITHUB_GEM_VERSION} \
    jekyll-github-metadata \
    minitest:${MINITEST_GEM_VERSION} \
    blankslate:${BLANKSLATE_GEM_VERSION} \
    hitimes:${HITIMES_GEM_VERSION} \
    timers:${TIMERS_GEM_VERSION} \
    celluloid:${CELLULOID_GEM_VERSION} \
    fast-stemmer:${FASTSTEMMER_GEM_VERSION} \
  && apk del build_deps \
  && apk add git \
  && mkdir -p /usr/src/app \
  && rm -rf /usr/lib/ruby/gems/*/cache/*.gem

WORKDIR /usr/src/app

EXPOSE 4000 80
CMD jekyll serve -d /_site --watch --force_polling -H 0.0.0.0 -P 4000

I'm running Docker 17.09.0-ce-win32 (13529) on Windows 10 Professional.

goochjs avatar Oct 08 '17 16:10 goochjs

I had this issue when first starting the container :

➜ docker run -t --rm -v "$PWD":/usr/src/app -p "4000:4000" starefossen/github-pages
Unable to find image 'starefossen/github-pages:latest' locally
latest: Pulling from starefossen/github-pages
90f4dba627d6: Pull complete
ad7f738df39a: Pull complete
a6e59a321083: Pull complete
c1ea2460dd17: Pull complete
2274dfa03c63: Pull complete
50c4cca21ee0: Pull complete
9fe02f4ff1a4: Pull complete
a722e2320476: Pull complete
Digest: sha256:16b467a530387aaa509b54f514cefb4803a73ef2b179a0dade64aeb4dcb45bc7
Status: Downloaded newer image for starefossen/github-pages:latest
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/spec_set.rb:87:in `block in materialize': Could not find i18n-0.8.1 in any of the sources (Bundler::GemNotFound)
	from /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/spec_set.rb:81:in `map!'
	from /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/spec_set.rb:81:in `materialize'
	from /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/definition.rb:159:in `specs'
	from /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/definition.rb:218:in `specs_for'
	from /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/definition.rb:207:in `requested_specs'
	from /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/runtime.rb:109:in `block in definition_method'
	from /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/runtime.rb:21:in `setup'
	from /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler.rb:101:in `setup'
	from /usr/local/bundle/gems/jekyll-3.5.2/lib/jekyll/plugin_manager.rb:48:in `require_from_bundler'
	from /usr/local/bundle/gems/jekyll-3.5.2/exe/jekyll:9:in `<top (required)>'
	from /usr/local/bundle/bin/jekyll:23:in `load'
	from /usr/local/bundle/bin/jekyll:23:in `<main>'

➜ docker run -t --rm -v "$PWD":/usr/src/app -p "4000:4000" starefossen/github-pages
Password:
/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/spec_set.rb:87:in `block in materialize': Could not find i18n-0.8.1 in any of the sources (Bundler::GemNotFound)
	from /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/spec_set.rb:81:in `map!'
	from /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/spec_set.rb:81:in `materialize'
	from /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/definition.rb:159:in `specs'
	from /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/definition.rb:218:in `specs_for'
	from /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/definition.rb:207:in `requested_specs'
	from /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/runtime.rb:109:in `block in definition_method'
	from /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler/runtime.rb:21:in `setup'
	from /usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.15.4/lib/bundler.rb:101:in `setup'
	from /usr/local/bundle/gems/jekyll-3.5.2/lib/jekyll/plugin_manager.rb:48:in `require_from_bundler'
	from /usr/local/bundle/gems/jekyll-3.5.2/exe/jekyll:9:in `<top (required)>'
	from /usr/local/bundle/bin/jekyll:23:in `load'
	from /usr/local/bundle/bin/jekyll:23:in `<main>'

Then I looked at the Gemfile.lock and foudn a reference to that library in it, so I removed the Gemfile to see if it was related, and it worked :

➜ docker run -t --rm -v "$PWD":/usr/src/app -p "4000:4000" starefossen/github-pages
Password:
Configuration file: /usr/src/app/_config.yml
       Deprecation: The 'gems' configuration option has been renamed to 'plugins'. Please update your config file accordingly.
            Source: /usr/src/app
       Destination: /_site
 Incremental build: disabled. Enable with --incremental
      Generating...
                    done in 5.034 seconds.
 Auto-regeneration: enabled for '/usr/src/app'
    Server address: http://0.0.0.0:4000/
  Server running... press ctrl-c to stop.

bric3 avatar Oct 19 '17 09:10 bric3

EDIT : haha found the culprit as I'm not a ruby guy, I foudn out that the folder had an old Gemfile.lock, now it's working properly. The startup script should eventually could check if there's a Gemfile.lock that wasn't generated by the container.


Still got a similar issue. I hoped there was an update on this problem.

➜ docker run -t --rm -v "$PWD":/usr/src/app -p "4000:4000" starefossen/github-pages
Unable to find image 'starefossen/github-pages:latest' locally
latest: Pulling from starefossen/github-pages
ff3a5c916c92: Pull complete
8e2da6035957: Pull complete
41a21a92c054: Pull complete
05eea10525c0: Pull complete
fd47107928f7: Pull complete
63e83be5c8ee: Pull complete
0beef8a43b92: Pull complete
Digest: sha256:862c7ff821db9ddb17469ce7ea3252f90d6d3d36efe85194e086dc0b0eb8ee94
Status: Downloaded newer image for starefossen/github-pages:latest
Traceback (most recent call last):
	12: from /usr/local/bundle/bin/jekyll:23:in `<main>'
	11: from /usr/local/bundle/bin/jekyll:23:in `load'
	10: from /usr/local/bundle/gems/jekyll-3.6.2/exe/jekyll:11:in `<top (required)>'
	 9: from /usr/local/bundle/gems/jekyll-3.6.2/lib/jekyll/plugin_manager.rb:50:in `require_from_bundler'
	 8: from /usr/local/lib/ruby/site_ruby/2.5.0/bundler.rb:107:in `setup'
	 7: from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/runtime.rb:20:in `setup'
	 6: from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/runtime.rb:108:in `block in definition_method'
	 5: from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/definition.rb:226:in `requested_specs'
	 4: from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/definition.rb:237:in `specs_for'
	 3: from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/definition.rb:170:in `specs'
	 2: from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/spec_set.rb:82:in `materialize'
	 1: from /usr/local/lib/ruby/site_ruby/2.5.0/bundler/spec_set.rb:82:in `map!'
/usr/local/lib/ruby/site_ruby/2.5.0/bundler/spec_set.rb:88:in `block in materialize': Could not find i18n-0.8.6 in any of the sources (Bundler::GemNotFound)

bric3 avatar Feb 27 '18 12:02 bric3