Skip to content

Commit 98e395a

Browse files
committed
Workaround issue installing Gems via JRuby on OpenJDK 17.0.3 (and 11.0.15)
Se jruby/jruby#7182 and https://bugs.openjdk.java.net/browse/JDK-8285445
1 parent 8e1a86d commit 98e395a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

server/rails.gradle

+12
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ task initializeRailsGems {
124124
workingDir = project.railsRoot
125125
args = ['-S', 'bundle', 'install']
126126
maxHeapSize = '1g'
127+
128+
// Workaround JDK 17.0.3 issue https://bugs.openjdk.java.net/browse/JDK-8285445 on Windows. See https://github.com/jruby/jruby/issues/7182
129+
// Should be able to be removed after OpenJDK 17.0.4 (July 2022)
130+
jvmArgs += '-Djdk.io.File.enableADS=true'
127131
}
128132
}
129133
}
@@ -213,6 +217,10 @@ task compileAssetsRailsTest(type: ExecuteUnderRailsTask) {
213217

214218
args = ['-S', 'rake', '--trace', 'assets:clobber', "assets:precompile"]
215219

220+
// Workaround JDK 17.0.3 issue https://bugs.openjdk.java.net/browse/JDK-8285445 on Windows. See https://github.com/jruby/jruby/issues/7182
221+
// Should be able to be removed after OpenJDK 17.0.4 (July 2022)
222+
jvmArgs += '-Djdk.io.File.enableADS=true'
223+
216224
doFirst {
217225
delete "${project.railsRoot}/tmp"
218226
delete publicAssetsDir
@@ -241,6 +249,10 @@ task compileAssetsRailsProd(type: ExecuteUnderRailsTask) {
241249

242250
args = ['-S', 'rake', '--trace', 'assets:clobber', 'assets:precompile']
243251

252+
// Workaround JDK 17.0.3 issue https://bugs.openjdk.java.net/browse/JDK-8285445 on Windows. See https://github.com/jruby/jruby/issues/7182
253+
// Should be able to be removed after OpenJDK 17.0.4 (July 2022)
254+
jvmArgs += '-Djdk.io.File.enableADS=true'
255+
244256
doFirst {
245257
delete "${project.railsRoot}/tmp"
246258
delete outputAssetsDir

0 commit comments

Comments
 (0)