From 31d2dae690643eee8b6edd699fa06f7e831e8b38 Mon Sep 17 00:00:00 2001 From: Benjamin Wood Date: Wed, 31 Aug 2022 16:13:03 -0700 Subject: [PATCH] Do not consider local platform version if it is musl A recent change in ruby gems broke tailwindcss-rails compatibility with musl (and thus alpine linxu). The change was shiped in ruby gems v3.3.21. Specifically, this change: https://github.com/rubygems/rubygems/pull/5852/files#diff-b2eac061756123f15f8d8e41075e4b8466a60945cad4e594b4eadf241d1a4089R28 Given the file modified in this commit is an executable, I *think* its safe to mutate the local platform version without side effects. However, this probably deserves some further consideration. --- exe/tailwindcss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/exe/tailwindcss b/exe/tailwindcss index 4e957483..e5ad2ec5 100755 --- a/exe/tailwindcss +++ b/exe/tailwindcss @@ -4,6 +4,8 @@ require "shellwords" require "tailwindcss/upstream" +Gem::Platform.local.version = nil if Gem::Platform.local.version == "musl" + supported_platforms = Tailwindcss::Upstream::NATIVE_PLATFORMS.keys platform = [:cpu, :os].map { |m| Gem::Platform.local.send(m) }.join("-")