diff --git a/Gemfile b/Gemfile
index ed1a8307cb085f47411a2ed6a74354aed477f021..883500cd87a09317342a10a4483d350e43a64faa 100644
--- a/Gemfile
+++ b/Gemfile
@@ -3,3 +3,8 @@ gem 'github-pages', group: :jekyll_plugins
 
 gem "sprockets", "~> 3.7"
 gem "webrick", "~> 1.7"
+
+# Fix ffi version to fix the following bug:
+#   ffi-1.17.0-x86_64-linux-musl requires rubygems version >= 3.3.22, which is
+#   incompatible with the current version, 2.7.6.2
+gem "ffi", "< 1.17.0"