sassc-ruby: Windows gems do not install on JRuby
I will preface this by saying that sassc-ruby works great on JRuby as long as you have build tools available!
Of course this is a problem for all Rubies running on Windows, since most users do not have build tools there. To fix this, you started releasing binary gems in 2.1+.
Unfortunately, the way that RubyGems selects binary gems means that they will not install on JRuby. In order for JRuby to have its own binary gems, we have always set our RUBY_PLATFORM
to “java”, and you will see those gems out there with a -java
suffix. When RubyGems attempts to install sassc on JRuby on Windows, it does not see a -java
suffix, so it falls back to the non-platform gem… and we’re back where we started trying to build on Windows.
The fix is actually fairly simple: we need either the base gem release or a new -java
gem release to include all the binaries for Windows and select the correct one at install or runtime. Since you already have the logic to pre-build the libsass binaries, this is just a packaging/release issue.
We are standing by to help make this happen.
Thank you very much for using FFI for this gem… it makes JRuby support almost automatic.
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 1
- Comments: 17 (1 by maintainers)
There’s no way to target just JRuby + Windows because RubyGems only supports a single platform per gem. We’ve lobbied for adding more dimensions to this platform selection, but no work has been done toward that end. So yes, the -java gem will be selected on all platforms if that’s the direction we go.
The options I see right now are:
Note also that TruffleRuby now forces its platform to always be “ruby” in terms of gems, so it won’t pick up native binaries either. So the binary gems as they stand will only ever be installed when using CRuby.