-
-
Notifications
You must be signed in to change notification settings - Fork 925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JRuby 9.1.2.0 not working on windows server 2003/2003 R2 #3998
Comments
This is like running windows XP right?... why upgrade a runtime and not your OS |
No, this is like running windows server 2003 on a production machine for which upgrading to 2008-2012 will cost circa 10k euros... |
Sadly, this function appears to have been added in Windows Server 2008. https://msdn.microsoft.com/en-us/library/windows/desktop/aa363866(v=vs.85).aspx I know @djberg96 has recommended not supporting anything this old, but perhaps on older Windows we should just behave like MRI did before adding Windows symlink support? Thoughts? |
FWIW, you get this error now because CRuby added File.symlink support for Windows in Ruby 2.3, and we had to follow suit using @djberg96's FFI-based code. That code only works on Windows systems where |
There's a way by installing some sw package or upgrade on the server to implement that function in windows server 2003? |
@PanDar1 No, I don't believe so. The best we could do would be to modify JRuby to have pre-2.3 behavior for symlink on those platforms. |
It looks like MRI defines its stub "not implemented" method for symlink on platforms where the latter is not supported. We can force the symlink method to be "not implemented" when running on Windows. Then, at least RubyGems can be patched to check for symlink, if it doesn't already. |
Correction...we can set it to not implemented if it's unsupported on a given platform. |
@PanDar1 Please test the fix I just pushed. I skip the symlink definition completely on Windows when CreateSymbolicLinkW is not available. @djberg96 This is not a beautiful way to do it, but win32-ffi could perhaps wrap just the symlink definition and skip it when appropriate. It should be available in tonight's snapshot build at http://ci.jruby.org, or you can build master yourself. |
jruby 32 bit, version 9.1.2.0
windows server 2003 32 bit, 2003 R2 32 bit
new installation of jruby, only preinstalled gems, the command gem list return the following output
C:\JRAILS
1\APPLIC1\ASSETS~1>gem listFFI::NotFoundError: Function 'CreateSymbolicLinkW' not found in [kernel32]
attach_function at C:/jrails4_update/jruby-9.1.2.0/lib/ruby/stdlib/ffi/library.rb:241
attach_pfunc at uri:classloader:/jruby/kernel/file.rb:25
module:Functions at uri:classloader:/jruby/kernel/file.rb:31
module:File at uri:classloader:/jruby/kernel/file.rb:16
module:Windows at uri:classloader:/jruby/kernel/file.rb:8
module:JRuby at uri:classloader:/jruby/kernel/file.rb:7
at uri:classloader:/jruby/kernel/file.rb:6
load at org/jruby/RubyKernel.java:962
at file:/C:/jrails4_update/jruby-9.1.2.0/lib/jruby.jar!/jruby/kernel.rb:1
On a windows server 2008 64 bit server no problems...
Jruby 1.7.23 working on the 2003 machines
The text was updated successfully, but these errors were encountered: