From 9bb7c8d0c0b13cceda3444c6984358f2efaa2e73 Mon Sep 17 00:00:00 2001 From: nanaya Date: Tue, 19 Nov 2024 02:08:05 +0900 Subject: [PATCH 1/2] Show more useful link for unsupported platform error --- README.md | 2 +- lib/tailwindcss/ruby.rb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6f2fd84..79d4761 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ gem install tailwindcss-ruby ### Using a local installation of `tailwindcss` -If you are not able to use the vendored standalone executables (for example, if you're on an unsupported platform), you can use a local installation of the `tailwindcss` executable by setting an environment variable named `TAILWINDCSS_INSTALL_DIR` to the directory path containing the executable. +If you are not able to use the vendored standalone executables (for example, if you're on an unsupported platform), you can use a [local installation](https://tailwindcss.com/docs/installation) of the `tailwindcss` executable by setting an environment variable named `TAILWINDCSS_INSTALL_DIR` to the directory path containing the executable. For example, if you've installed `tailwindcss` so that the executable is found at `/path/to/node_modules/bin/tailwindcss`, then you should set your environment variable like so: diff --git a/lib/tailwindcss/ruby.rb b/lib/tailwindcss/ruby.rb index 25b87a6..f7326db 100644 --- a/lib/tailwindcss/ruby.rb +++ b/lib/tailwindcss/ruby.rb @@ -41,7 +41,8 @@ def executable(exe_path: DEFAULT_DIR) if Tailwindcss::Ruby::Upstream::NATIVE_PLATFORMS.keys.none? { |p| Gem::Platform.match_gem?(Gem::Platform.new(p), GEM_NAME) } raise UnsupportedPlatformException, <<~MESSAGE #{GEM_NAME} does not support the #{platform} platform - Please install tailwindcss following instructions at https://tailwindcss.com/docs/installation + See https://github.com/flavorjones/tailwindcss-ruby#using-a-local-installation-of-tailwindcss + for more details. MESSAGE end From 911dd4b78c18dec0cd080baa4c8b3f03a33df808 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Mon, 18 Nov 2024 12:24:22 -0500 Subject: [PATCH 2/2] doc: make a note not to change the section title --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 79d4761..66c4392 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,8 @@ gem install tailwindcss-ruby ### Using a local installation of `tailwindcss` + + If you are not able to use the vendored standalone executables (for example, if you're on an unsupported platform), you can use a [local installation](https://tailwindcss.com/docs/installation) of the `tailwindcss` executable by setting an environment variable named `TAILWINDCSS_INSTALL_DIR` to the directory path containing the executable. For example, if you've installed `tailwindcss` so that the executable is found at `/path/to/node_modules/bin/tailwindcss`, then you should set your environment variable like so: