Faild build Jekyll with build system V2

Hi,

after tens of tries every time I try to build Jekyll with Cloudflare Pages using Build system version V2
I got error
I believe it’s because of this pre-configuration “BUNDLE_WITHOUT” command in V2 system!

Installing project dependencies: BUNDLE_WITHOUT="development test" bundle install
..
..
|14:52:16.451|Bundle complete! 6 Gemfile dependencies, 37 gems now installed.|
|---|---|
|14:52:16.452|Gems in the groups 'development' and 'test' were not installed.|
|14:52:16.452|Use `bundle info [gemname]` to see where a bundled gem is installed.|
|14:52:16.521|Executing user command: jekyll build|
|14:52:18.096|/opt/buildhome/.asdf/installs/ruby/3.2.2/lib/ruby/3.2.0/bundler/definition.rb:524:in `materialize': Could not find html-proofer-3.19.4, nokogiri-1.15.3-x86_64-linux, parallel-1.23.0, rainbow-3.1.1, typhoeus-1.4.0, yell-2.2.2, racc-1.7.1, ethon-0.16.0 in locally installed gems (Bundler::GemNotFound)|

while the same build is working with build system V1 and also Github Pages working as well

So what’s wrong with build system V2 ?? and why this command exists “BUNDLE_WITHOUT” ?!

As I expected,
I added an environment-variables BUNDLE_WITHOUT with value “” to the build and it works!!!

I believe this should be the default like, IDK why V2 made this!

Thanks to Claude!

The issue seems to be caused by the BUNDLE_WITHOUT environment variable that is set by default in Cloudflare Pages build system V2.

This variable tells Bundler to not install gems from the 'development' and 'test' groups when running `bundle install`. However, it looks like Jekyll requires some of those gems to build properly.

The BUNDLE_WITHOUT variable is meant to optimize build times by avoiding installing unneeded gems, but in this case it is likely excluding gems that Jekyll requires. Adjusting the variable should resolve the build errors you are seeing. Let me know if you have any other questions!

IDK why V2 made this!

:wave: That was me. Sorry! I very deliberately implemented the BUNDLE_WITHOUT="development test" thing thinking “of course bundler users only want to install production dependencies”

I’ll file a bug and we’ll get this fixed soon. Thank you so much for the feedback!

2 Likes

I knew it :smiley:

np I hope all is good now :smiley:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.