Skip to content

Conversation

@stickies-v
Copy link
Collaborator

@stickies-v stickies-v commented Dec 3, 2025

Bumps Ruby to 3.4 and closes #1437 by fixing the Travis CI job.

Ruby 2.6 became EOL in 2022, so we should bump it. I think going straight to the latest stable (3.4) makes sense, but I'm very unfamiliar with the Ruby ecosystem. We should also bump the ruby version on the server where this website is hosted, but I think that's done outside of this repo? Ideally the ruby versions are identical so local and CI builds mirror what's actually going live.

One side-effect of the EOL ruby version is that docker compose up no longer works without cached dependencies:

build log
 => ERROR [2/7] RUN apt-get update &&     apt-get install -y locales       0.6s
------
 > [2/7] RUN apt-get update &&     apt-get install -y locales:
0.324 Ign:1 http://deb.debian.org/debian buster InRelease
0.324 Ign:2 http://security.debian.org/debian-security buster/updates InRelease
0.335 Ign:3 http://deb.debian.org/debian buster-updates InRelease
0.341 Err:4 http://security.debian.org/debian-security buster/updates Release
0.341   404  Not Found [IP: 151.101.62.132 80]
0.349 Err:5 http://deb.debian.org/debian buster Release
0.349   404  Not Found [IP: 151.101.62.132 80]
0.363 Err:6 http://deb.debian.org/debian buster-updates Release
0.363   404  Not Found [IP: 151.101.62.132 80]
0.368 Reading package lists...
0.377 E: The repository 'http://security.debian.org/debian-security buster/updates Release' does not have a Release file.
0.377 E: The repository 'http://deb.debian.org/debian buster Release' does not have a Release file.
0.377 E: The repository 'http://deb.debian.org/debian buster-updates Release' does not have a Release file.
------
Dockerfile:5

--------------------

   4 |     # Install program to configure locales

   5 | >>> RUN apt-get update && \

   6 | >>>     apt-get install -y locales

   7 |     RUN dpkg-reconfigure locales && \

--------------------

failed to solve: process "/bin/sh -c apt-get update &&     apt-get install -y locales" did not complete successfully: exit code: 100

Changes in this PR:

  • first 2 housekeeping changes, removing a deprecated docker-compose field, and fixing an issue that only exists locally, where redirects don't properly work. They can be left out of this PR as they are unrelated, but seem small enough to include.
  • bump ruby to 3.4
  • address build warnings by modernizing some font-awesome code, and silencing warnings from deprecations that seem hard to work around otherwise (rationale in commit message and inline)
  • fix tests by using new parameter names and fixing source issues

To review:

  • make sure you can build the website, and that the website is unchanged and works well
  • the Gemfile.lock is autogenerated, but there may be slight platform differences on your machine. I'm keeping PLATFORMS to just ruby on purpose.
  • ensure actual deployment in prod works (by site admin)

Alternative to #2470 by not relying on EOL software. Also see #1438.

Build with dev config first (correct URL), then serve --skip-initial-build.
jekyll serve --host 0.0.0.0 otherwise overrides site.url to 0.0.0.0.
@stickies-v
Copy link
Collaborator Author

In #1438 (comment) it is mentioned that --incremental became very slow after upgrading ruby or dependencies, but I'm not able to reproduce that on this branch when previewing with docker compose up. Performance seems good, but I can't actually preview master anymore so I can't compare.

Required for Ruby 3.1+ where Psych 4 disables YAML aliases by default
and restricts class instantiation.

See https://bugs.ruby-lang.org/issues/17866
@stickies-v
Copy link
Collaborator Author

Draft while I'm figuring out the netlify CI issue where it's trying to compile ruby from source and timing out doing so:

https://app.netlify.com/projects/bitcoinops/deploys/69305bd1a6665b0008b32efe

4:03:47 PM: build-image version: cc7730f6f332688234781c0852e824dedc2337ca (noble)
4:03:47 PM: buildbot version: cc7730f6f332688234781c0852e824dedc2337ca
4:03:47 PM: Fetching cached dependencies
4:03:47 PM: Starting to download cache of 820.4MB (Last modified: 2025-12-03 11:28:13 +0000 UTC)
4:03:48 PM: Finished downloading cache in 1.294s
4:03:48 PM: Starting to extract cache
4:04:03 PM: Finished extracting cache in 14.623s
4:04:03 PM: Finished fetching cache in 16.006s
4:04:03 PM: Starting to prepare the repo for build
4:04:03 PM: Preparing Git Reference pull/2577/head
4:04:06 PM: Starting to install dependencies
4:04:06 PM: Started restoring cached python cache
4:04:06 PM: Finished restoring cached python cache
4:04:06 PM: Attempting Ruby version 3.4, read from .ruby-version file
4:04:06 PM: Started restoring cached ruby cache
4:04:07 PM: Finished restoring cached ruby cache
4:04:07 PM: mise ruby@3.4.7      install
4:04:09 PM: mise ruby@3.4.7      ruby-build
4:04:09 PM: mise ruby@3.4.7      ==> Downloading ruby-3.4.7.tar.gz...
4:04:09 PM: mise ruby@3.4.7      -> curl -q -fL -o ruby-3.4.7.tar.gz https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.7.tar.gz
4:04:09 PM:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
4:04:09 PM:                                  Dload  Upload   Total   Spent    Left  Speed
4:04:09 PM:   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
4:04:09 PM: 100 22.1M  100 22.1M    0     0   107M      0 --:--:-- --:--:-- --:--:--  107M
4:04:10 PM: mise ruby@3.4.7      ==> Installing ruby-3.4.7...
4:04:10 PM: mise ruby@3.4.7      -> ./configure "--prefix=$HOME/.local/share/mise/installs/ruby/3.4.7" --enable-shared --with-ext=openssl,psych,+
4:22:06 PM: Failed during stage 'Install dependencies': Command did not finish within the time limit
4:22:06 PM: Execution timed out after 17m59.83439973s
4:22:06 PM: Execution timed out after 17m59.83459359s
4:22:06 PM: Failing build: Failed to install dependencies

@stickies-v stickies-v force-pushed the bump-ruby branch 3 times, most recently from edf2ec7 to 1f7b6fd Compare December 3, 2025 17:15
Ruby 2.6 has become EOL since 2022. Bump it to the latest stable
version. Also update the lockfile and dependencies.
Ruby 2.6 has become EOL since 2022. Bump it to the latest stable
version. Also update the lockfile and dependencies.
Replace deprecated `/` division with `calc()` to fix Dart Sass 2.0
deprecation warnings. See https://sass-lang.com/d/slash-div
- quiet_deps: suppress warnings from dependencies (minima theme)
- silence @import deprecation: migration to @use/@forward requires
  significant minima refactoring (tracked: https://sass-lang.com/d/import)
Change `//github.com/` to `https://github.com/` to ensure
links work correctly and pass html-proofer validation.
The timestamp seek buttons used anchor tags without href attributes,
relying solely on onclick handlers. Add href="javascript:void(0)" to
make them valid anchors for html-proofer.
- Remove --check-html (deprecated in 4.0+)
- Rename --url-ignore to --ignore-urls
- Add --no-enforce-https (5.x now enforces https by default)
@stickies-v stickies-v changed the title Bump ruby to 3.4 Bump ruby to 3.4 and fix Travis CI Dec 3, 2025
@stickies-v stickies-v marked this pull request as ready for review December 3, 2025 18:38
@stickies-v
Copy link
Collaborator Author

Undrafting, it seems like this PR is ready: local builds (e.g. docker compose up) work fine again, and the Travis job is green.

The Netlify job failing is because of a cache issue that can be addressed by either clearing the site-wide Netlify cache (may cause issues for branches still on Ruby 2.6.4), by re-running this job without cache, or by increasing the build timeout so compilng Ruby from source doesn't fail. Specifically, the cache issue is that even though the noble Netlify build image has Ruby 3.4.7 installed, it is not picking it up and instead trying to compile it from source, which times out.

Run without cache:

5:36:09 PM: build-image version: cc7730f6f332688234781c0852e824dedc2337ca (noble)
5:36:09 PM: buildbot version: cc7730f6f332688234781c0852e824dedc2337ca
5:36:09 PM: Building without cache
5:36:09 PM: Starting to prepare the repo for build
5:36:10 PM: No cached dependencies found. Cloning fresh repo
5:36:10 PM: git clone --filter=blob:none https://github.com/bitcoinops/bitcoinops.github.io
5:36:10 PM: Preparing Git Reference pull/2577/head
5:36:13 PM: Starting to install dependencies
5:36:13 PM: Attempting Ruby version 3.4.7, read from .ruby-version file
5:36:13 PM: Ruby version set to 3.4.7
5:36:13 PM: Started restoring cached ruby gems
5:36:13 PM: Finished restoring cached ruby gems
5:36:13 PM: Installing gem bundle
...

Run with cache:

5:45:53 PM: build-image version: cc7730f6f332688234781c0852e824dedc2337ca (noble)
5:45:53 PM: buildbot version: cc7730f6f332688234781c0852e824dedc2337ca
5:45:54 PM: Fetching cached dependencies
5:45:54 PM: Starting to download cache of 820.4MB (Last modified: 2025-12-03 16:30:52 +0000 UTC)
5:45:55 PM: Finished downloading cache in 1.557s
5:45:55 PM: Starting to extract cache
5:46:02 PM: Finished extracting cache in 7.081s
5:46:02 PM: Finished fetching cache in 8.714s
5:46:02 PM: Starting to prepare the repo for build
5:46:03 PM: Preparing Git Reference pull/2579/head
5:46:04 PM: Starting to install dependencies
5:46:04 PM: Started restoring cached python cache
5:46:04 PM: Finished restoring cached python cache
5:46:04 PM: Attempting Ruby version 3.4.7, read from .ruby-version file
5:46:04 PM: Started restoring cached ruby cache
5:46:05 PM: Finished restoring cached ruby cache
5:46:05 PM: mise ruby@3.4.7      install
5:46:06 PM: mise ruby@3.4.7      ruby-build
5:46:06 PM: mise ruby@3.4.7      ==> Downloading ruby-3.4.7.tar.gz...
5:46:06 PM: mise ruby@3.4.7      -> curl -q -fL -o ruby-3.4.7.tar.gz https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.7.tar.gz
5:46:06 PM:   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
5:46:06 PM:                                  Dload  Upload   Total   Spent    Left  Speed
5:46:07 PM:   0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
5:46:07 PM: 100 22.1M  100 22.1M    0     0   103M      0 --:--:-- --:--:-- --:--:--  103M
5:46:07 PM: mise ruby@3.4.7      ==> Installing ruby-3.4.7...
5:46:07 PM: mise ruby@3.4.7      -> ./configure "--prefix=$HOME/.local/share/mise/installs/ruby/3.4.7" --enable-shared --with-ext=openssl,psych,+
6:04:04 PM: Failed during stage 'Install dependencies': Command did not finish within the time limit

@bitschmidty
Copy link
Contributor

@stickies-v Taking a look at this and will try to get it working locally. Thanks for your work on this!

Copy link
Contributor

@bitschmidty bitschmidty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to get this working on my machine locally (no docker).

Tested:

  • build processes (preview, production, all, clean)
  • ensured the preview auto regenerated based on file changes
  • built with JEKYLL_ENV=email make clean preview (for the email version) and smoke tested
  • tested the updated podcast seek links
  • smoke tested various pages in the site

Pushed a commit that fixed a bunch of warnings from the new version of Jekyll around non-ASCII slugs.

@azuchi @Gustavojfe you might have a test on your setups as well

@azuchi
Copy link
Contributor

azuchi commented Dec 6, 2025

This is good improvement. The builds are successful in my local environment(Ubuntu 24.04.3 LTS).

@bitschmidty Thanks also for fixing the slug warnings.

@bitschmidty
Copy link
Contributor

Tentative plan, if all goes well from reviewers, is to merge this after the year in review newsletter. That will give us a week+ of downtime from new newsletter publications for contributors to get their respective local environments working with the new versions from this PR.

That likely means translations will be the first new PRs after the updates. So @azuchi @Copinmalin @hulatown, heads up that this is coming and perhaps prepare some time to update your local development environments at that point. For myself, I have one of my computers setup for this PR's new dev environment for testing and another computer for working in the current setup. Other contributors may have to setup docker or other ways of testing this PR without nuking their current setups in the meantime.

cc: @murchandamus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Travis Build Issue (RubyGems)

3 participants