Leon
Leon
CDCloudflare Developers
Created by Leon on 10/23/2023 in #pages-help
How to use specific bundler version in V2?
I was excited to see the build cache feature, which needs the v2 build system enabled. In v1, the version of bundler is detected from the Gemfile.lock file, but in v2 this seems not to be the case. At https://developers.cloudflare.com/pages/platform/language-support-and-tools/ it shows "Corresponds with Ruby version" for Supported versions, but there aren't any instructions about configuring it. What's the appropriate way to configure the version of bundler?
13:02:37.153 /opt/buildhome/.asdf/installs/ruby/2.6.2/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.1.4) required by your /opt/buildhome/repo/Gemfile.lock. (Gem::GemNotFoundException)
13:02:37.153 /opt/buildhome/.asdf/installs/ruby/2.6.2/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.1.4) required by your /opt/buildhome/repo/Gemfile.lock. (Gem::GemNotFoundException)
I have tried updating the version, and using BUNDLER_VERSION env variable, but same result.
15:36:19.526 /opt/buildhome/.asdf/installs/ruby/2.6.2/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.4.21) required by your /opt/buildhome/repo/Gemfile.lock. (Gem::GemNotFoundException)
15:36:19.526 /opt/buildhome/.asdf/installs/ruby/2.6.2/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.4.21) required by your /opt/buildhome/repo/Gemfile.lock. (Gem::GemNotFoundException)
16:20:14.985 /opt/buildhome/.asdf/installs/ruby/2.6.2/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.4.21) required by `$BUNDLER_VERSION`. (Gem::GemNotFoundException)
16:20:14.985 /opt/buildhome/.asdf/installs/ruby/2.6.2/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.4.21) required by `$BUNDLER_VERSION`. (Gem::GemNotFoundException)
8 replies
CDCloudflare Developers
Created by Leon on 4/12/2023 in #pages-help
Has the temp directory location changed in the past week?
Our Jekyll build has started failing on an issue in the parent theme. If we rerun old (successful) builds from 6 days ago, they now fail. All versions of dependencies are the same in the successful builds 6 days ago compared to the unsuccessful ones today. I have traced it back to what I believe to be the temp directory now being set to /opt/buildhome/repo/. I believe this might have changed in the past 6 days. When Cloudflare builds:
Remote Theme: Using theme pmarsceill/just-the-docs
Remote Theme: Downloading https://codeload.github.com/pmarsceill/just-the-docs/zip/v0.2.7 to /opt/buildhome/repo/jekyll-remote-theme-20230412-14794-svae9e.zip
Remote Theme: Unzipping /opt/buildhome/repo/jekyll-remote-theme-20230412-14794-svae9e.zip to /opt/buildhome/repo/jekyll-remote-theme-20230412-14794-j3aea2
Remote Theme: Using theme pmarsceill/just-the-docs
Remote Theme: Downloading https://codeload.github.com/pmarsceill/just-the-docs/zip/v0.2.7 to /opt/buildhome/repo/jekyll-remote-theme-20230412-14794-svae9e.zip
Remote Theme: Unzipping /opt/buildhome/repo/jekyll-remote-theme-20230412-14794-svae9e.zip to /opt/buildhome/repo/jekyll-remote-theme-20230412-14794-j3aea2
When building locally:
Remote Theme: Using theme pmarsceill/just-the-docs
Remote Theme: Downloading https://codeload.github.com/pmarsceill/just-the-docs/zip/v0.2.7 to /tmp/jekyll-remote-theme-20230412-93-vzhns2.zip
Remote Theme: Unzipping /tmp/jekyll-remote-theme-20230412-93-vzhns2.zip to /tmp/jekyll-remote-theme-20230412-93-pdotqn
Remote Theme: Using theme pmarsceill/just-the-docs
Remote Theme: Downloading https://codeload.github.com/pmarsceill/just-the-docs/zip/v0.2.7 to /tmp/jekyll-remote-theme-20230412-93-vzhns2.zip
Remote Theme: Unzipping /tmp/jekyll-remote-theme-20230412-93-vzhns2.zip to /tmp/jekyll-remote-theme-20230412-93-pdotqn
Basically, when building in Cloudflare, the parent theme zip is downloaded inside the repo directory where its contents are seen as part of our site, which causes the build error. I've had to enable verbose mode to generate the above output so unfortunately can't see which directory was used when it was working without error 6 days ago. But obviously can see that it uses /tmp when we run the build locally.
10 replies