Summary
On Ruby 4.0.x, bundle install fails to resolve native gems that use the -linux platform suffix (e.g. x86_64-linux, aarch64-linux). Bundler appears to expect -linux-gnu or -linux-musl variants that these gems don't publish.
This affects any native gem using the standard rake-compiler platform names — for example, tailwindcss-ruby < 4.0.
Context
The tailwindcss-ruby maintainer confirmed this is likely a Bundler issue, not something individual gems should work around:
If bundler has -- surprisingly -- stopped supporting -linux platform suffixes then it's mostly likely a bundler bug that we should fix, not something that every gem should be reconfigured to work around.
See: flavorjones/tailwindcss-ruby#126
The rake-compiler-dock docs describe the expected behavior: https://github.com/rake-compiler/rake-compiler-dock#linux-gnu-and-musl
To reproduce
- Use Ruby 4.0.x
gem "tailwindcss-ruby", "< 4.0" in a Gemfile
bundle install
Bundler fails to find a gem matching the local platform.
Workaround
Adding explicit -linux-gnu and -linux-musl entries to the gem's NATIVE_PLATFORMS hash resolves the issue, but this shouldn't be necessary per the rake-compiler-dock contract.
Environment
- Ruby: 4.0.5
- Bundler: 2.5.23 / 4.0.10
- Platform: x86_64-linux
- OS: Linux 6.8.0-124-generic
Summary
On Ruby 4.0.x,
bundle installfails to resolve native gems that use the-linuxplatform suffix (e.g.x86_64-linux,aarch64-linux). Bundler appears to expect-linux-gnuor-linux-muslvariants that these gems don't publish.This affects any native gem using the standard rake-compiler platform names — for example,
tailwindcss-ruby < 4.0.Context
The
tailwindcss-rubymaintainer confirmed this is likely a Bundler issue, not something individual gems should work around:See: flavorjones/tailwindcss-ruby#126
The rake-compiler-dock docs describe the expected behavior: https://github.com/rake-compiler/rake-compiler-dock#linux-gnu-and-musl
To reproduce
gem "tailwindcss-ruby", "< 4.0"in a Gemfilebundle installBundler fails to find a gem matching the local platform.
Workaround
Adding explicit
-linux-gnuand-linux-muslentries to the gem'sNATIVE_PLATFORMShash resolves the issue, but this shouldn't be necessary per the rake-compiler-dock contract.Environment