Skip to content

Commit e44a4e4

Browse files
authored
support x64-mingw-ucrt for Ruby 3.1 users (rails#172) (rails#173)
* Gemfile.lock: update nokogiri and bundler deps * support x64-mingw-ucrt for Ruby 3.1 users (rails#172)
1 parent 737c9ce commit e44a4e4

File tree

5 files changed

+29
-5
lines changed

5 files changed

+29
-5
lines changed

.github/workflows/gem-install.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ jobs:
55
strategy:
66
fail-fast: false
77
matrix:
8-
platform: ["ruby", "x64-mingw32", "x86_64-darwin", "x86_64-linux"]
8+
platform: ["ruby", "x64-mingw32", "x64-mingw-ucrt", "x86_64-darwin", "x86_64-linux"]
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v2
@@ -76,3 +76,17 @@ jobs:
7676
path: pkg
7777
- run: "gem install pkg/tailwindcss-rails-*.gem"
7878
- run: "tailwindcss --help"
79+
80+
windows-ucrt-install:
81+
needs: ["package"]
82+
runs-on: windows-2022
83+
steps:
84+
- uses: ruby/setup-ruby@v1
85+
with:
86+
ruby-version: "3.1"
87+
- uses: actions/download-artifact@v2
88+
with:
89+
name: gem-x64-mingw-ucrt
90+
path: pkg
91+
- run: "gem install pkg/tailwindcss-rails-*.gem"
92+
- run: "tailwindcss --help"

Gemfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ GEM
5757
mini_mime (>= 0.1.1)
5858
method_source (1.0.0)
5959
mini_mime (1.1.2)
60-
mini_portile2 (2.6.1)
60+
mini_portile2 (2.8.0)
6161
minitest (5.14.4)
62-
nokogiri (1.12.5)
63-
mini_portile2 (~> 2.6.1)
62+
nokogiri (1.13.6)
63+
mini_portile2 (~> 2.8.0)
6464
racc (~> 1.4)
6565
racc (1.6.0)
6666
rack (2.2.3)
@@ -96,4 +96,4 @@ DEPENDENCIES
9696
tailwindcss-rails!
9797

9898
BUNDLED WITH
99-
2.2.32
99+
2.3.14

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ Some users are reporting this error even when running on one of the supported na
4747

4848
- arm64-darwin
4949
- x64-mingw32
50+
- x64-mingw-ucrt
5051
- x86_64-darwin
5152
- x86_64-linux
5253
- aarch64-linux

lib/tailwindcss/upstream.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ module Upstream
77
NATIVE_PLATFORMS = {
88
"arm64-darwin" => "tailwindcss-macos-arm64",
99
"x64-mingw32" => "tailwindcss-windows-x64.exe",
10+
"x64-mingw-ucrt" => "tailwindcss-windows-x64.exe",
1011
"x86_64-darwin" => "tailwindcss-macos-x64",
1112
"x86_64-linux" => "tailwindcss-linux-x64",
1213
"aarch64-linux" => "tailwindcss-linux-arm64",

rakelib/package.rake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
# binary and executes it. Note that this script is required because rubygems requires that
1717
# executables declared in a gemspec must be Ruby scripts.
1818
#
19+
# Windows support note: we ship the same executable in two gems, the `x64-mingw32` and
20+
# `x64-mingw-ucrt` flavors because Ruby < 3.1 uses the MSCVRT runtime libraries, and Ruby >= 3.1
21+
# uses the UCRT runtime libraries. You can read more about this change here:
22+
#
23+
# https://rubyinstaller.org/2021/12/31/rubyinstaller-3.1.0-1-released.html
24+
#
1925
# As a concrete example, an x86_64-linux system will see these files on disk after installing
2026
# tailwindcss-rails-1.x.x-x86_64-linux.gem:
2127
#
@@ -30,6 +36,7 @@
3036
# - pkg/tailwindcss-rails-1.0.0-aarch64-linux.gem
3137
# - pkg/tailwindcss-rails-1.0.0-arm64-darwin.gem
3238
# - pkg/tailwindcss-rails-1.0.0-x64-mingw32.gem
39+
# - pkg/tailwindcss-rails-1.0.0-x64-mingw-ucrt.gem
3340
# - pkg/tailwindcss-rails-1.0.0-x86_64-darwin.gem
3441
# - pkg/tailwindcss-rails-1.0.0-x86_64-linux.gem
3542
#
@@ -43,6 +50,7 @@
4350
# - rake gem:aarch64-linux # Build the aarch64-linux gem
4451
# - rake gem:arm64-darwin # Build the arm64-darwin gem
4552
# - rake gem:x64-mingw32 # Build the x64-mingw32 gem
53+
# - rake gem:x64-mingw-ucrt # Build the x64-mingw-ucrt gem
4654
# - rake gem:x86_64-darwin # Build the x86_64-darwin gem
4755
# - rake gem:x86_64-linux # Build the x86_64-linux gem
4856
# - rake download # Download all tailwindcss binaries

0 commit comments

Comments
 (0)