Jekyll Build Command #33

Closed
opened 2025-11-20 04:15:06 -05:00 by saavagebueno · 2 comments
Owner

Originally created by @mswbull on GitHub (Feb 7, 2023).

Maybe a silly question, should I be able to run the "jekyll build" command for PRD builds? I get the following error.

docker run -v $(pwd):/site bretfisher/jekyll build
/usr/local/bundle/gems/bundler-2.4.3/lib/bundler/definition.rb:526:in materialize': Could not find jekyll-4.3.2, minima-2.5.1, jekyll-feed-0.17.0, webrick-1.8.1, jekyll-seo-tag-2.8.0, concurrent-ruby-1.2.0, sass-embedded-1.58.0-aarch64-linux-gnu in locally installed gems (Bundler::GemNotFound) from /usr/local/bundle/gems/bundler-2.4.3/lib/bundler/definition.rb:187:in specs'
from /usr/local/bundle/gems/bundler-2.4.3/lib/bundler/definition.rb:244:in specs_for' from /usr/local/bundle/gems/bundler-2.4.3/lib/bundler/runtime.rb:18:in setup'
from /usr/local/bundle/gems/bundler-2.4.3/lib/bundler.rb:170:in setup' from /usr/local/bundle/gems/jekyll-4.3.1/lib/jekyll/plugin_manager.rb:52:in require_from_bundler'
from /usr/local/bundle/gems/jekyll-4.3.1/exe/jekyll:11:in <top (required)>' from /usr/local/bundle/bin/jekyll:25:in load'
from /usr/local/bundle/bin/jekyll:25:in `

'

Appreciate your work creating this image.

Originally created by @mswbull on GitHub (Feb 7, 2023). Maybe a silly question, should I be able to run the "jekyll build" command for PRD builds? I get the following error. docker run -v $(pwd):/site bretfisher/jekyll build /usr/local/bundle/gems/bundler-2.4.3/lib/bundler/definition.rb:526:in `materialize': Could not find jekyll-4.3.2, minima-2.5.1, jekyll-feed-0.17.0, webrick-1.8.1, jekyll-seo-tag-2.8.0, concurrent-ruby-1.2.0, sass-embedded-1.58.0-aarch64-linux-gnu in locally installed gems (Bundler::GemNotFound) from /usr/local/bundle/gems/bundler-2.4.3/lib/bundler/definition.rb:187:in `specs' from /usr/local/bundle/gems/bundler-2.4.3/lib/bundler/definition.rb:244:in `specs_for' from /usr/local/bundle/gems/bundler-2.4.3/lib/bundler/runtime.rb:18:in `setup' from /usr/local/bundle/gems/bundler-2.4.3/lib/bundler.rb:170:in `setup' from /usr/local/bundle/gems/jekyll-4.3.1/lib/jekyll/plugin_manager.rb:52:in `require_from_bundler' from /usr/local/bundle/gems/jekyll-4.3.1/exe/jekyll:11:in `<top (required)>' from /usr/local/bundle/bin/jekyll:25:in `load' from /usr/local/bundle/bin/jekyll:25:in `<main>' Appreciate your work creating this image.
Author
Owner

@BretFisher commented on GitHub (Feb 13, 2023):

I suspect you need to do a bundle install first since you likely need to install all these ruby dependencies before building your jekyll site.

If you were using this repo's image, you could:

docker run -v $(pwd):/site -it --entrypoint bash bretfisher/jekyll

Then run your commands interactively:

bundle install --retry 5 --jobs 20
bundle exec jekyll build

Then your bind-mounted _site will be there, built by Jekyll and your Gemfile Jekyll dependencies.

If this is a business with common prod builds, then you likely need to build your own jekyll image that will run the bundle install during the image build with all your ruby dependencies built in, and then you can jekyll build easier.

@BretFisher commented on GitHub (Feb 13, 2023): I suspect you need to do a `bundle install` first since you likely need to install all these ruby dependencies before building your jekyll site. If you were using this repo's image, you could: `docker run -v $(pwd):/site -it --entrypoint bash bretfisher/jekyll` Then run your commands interactively: ```bash bundle install --retry 5 --jobs 20 bundle exec jekyll build ``` Then your bind-mounted `_site` will be there, built by Jekyll and your Gemfile Jekyll dependencies. If this is a business with common prod builds, then you likely need to build your own jekyll image that will run the `bundle install` during the image build with all your ruby dependencies built in, and then you can `jekyll build` easier.
Author
Owner

@BretFisher commented on GitHub (Feb 13, 2023):

I've updated the README with this answer to help others. I'll close this issue, but feel free to reopen if it wasn't the solution you were looking for.

@BretFisher commented on GitHub (Feb 13, 2023): I've updated the README with this answer to help others. I'll close this issue, but feel free to reopen if it wasn't the solution you were looking for.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jekyll-serve#33