Skip to content

Commit 129bbb5

Browse files
authored
doc: update README with a troubleshooting section (#123)
1 parent 86a4dc0 commit 129bbb5

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

README.md

+57
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,63 @@ The `tailwindcss:build` is automatically attached to `assets:precompile`, so bef
3131
Tailwind uses modern CSS features that are not recognized by the `sassc-rails` extension that was included by default in the Gemfile for Rails 6. In order to avoid any errors like `SassC::SyntaxError`, you must remove that gem from your Gemfile.
3232

3333

34+
## Troubleshooting
35+
36+
Some common problems experienced by users ...
37+
38+
### ERROR: Cannot find the tailwindcss executable for <supported platform>
39+
40+
Some users are reporting this error even when running on one of the supported native platforms:
41+
42+
- arm64-darwin
43+
- x64-mingw32
44+
- x86_64-darwin
45+
- x86_64-linux
46+
- aarch64-linux
47+
48+
#### Check Bundler PLATFORMS
49+
50+
A possible cause of this is that Bundler has not been told to include native gems for your current platform. Please check your `Gemfile.lock` file to see whether your native platform is included in the `PLATFORMS` section. If necessary, run:
51+
52+
``` sh
53+
bundle lock --add-platform <platform-name>
54+
```
55+
56+
and re-bundle.
57+
58+
59+
#### Check BUNDLE_FORCE_RUBY_PLATFORM
60+
61+
Another common cause of this is that bundler is configured to always use the "ruby" platform via the
62+
`BUNDLE_FORCE_RUBY_PLATFORM` config parameter being set to `true`. Please remove this configuration:
63+
64+
``` sh
65+
bundle config unset force_ruby_platform
66+
# or
67+
bundle config set --local force_ruby_platform false
68+
```
69+
70+
and re-bundle.
71+
72+
See https://bundler.io/man/bundle-config.1.html for more information.
73+
74+
75+
### "No such file or directory" running on Alpine (musl)
76+
77+
When running `tailwindcss` on an Alpine system, some users report a "No such file or directory" error message.
78+
79+
80+
#### Install gnu libc compatibility
81+
82+
The cause of this is the upstream `tailwindcss` binary executables being built on a gnu libc system, making them incompatible with standard musl libc systems.
83+
84+
A fix for this has been proposed upstream at https://github.com/tailwindlabs/tailwindcss/discussions/6785, but in the meantime a workaround is to install compatibility libraries:
85+
86+
``` sh
87+
apk add build-base gcompat
88+
```
89+
90+
3491
## License
3592

3693
Tailwind for Rails is released under the [MIT License](https://opensource.org/licenses/MIT).

0 commit comments

Comments
 (0)