-
-
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
gem install failure on Windows #2500
Comments
same here on win server 2003 |
I've traced it to the 'load_and_instantiate' method in the command_manager.rb file. It looks right, but it's failing to load for some reason. Still digging. |
Hi |
Not yet. I'm not even sure how win32-registry even enters into it. |
Ok, it's trying to require rubygems/commands/install_command.rb. Which in turn makes several require calls. I tried calling them individually, until I found one that failed. Narrowed it down to rubygems/dependency_installer.rb:
|
Ok, more tracing, it happens if you "require 'resolv'". Now digging into that. |
Here's the troublesome call:
MRI returns "C:/Windows/System32/drivers/etc/hosts". JRuby is choking. |
Alright, narrowed that down even more. Here's the code bringing down the whole shebang.
|
Alright, I think it's as simple as this:
After I made that change, it's working for me. |
I should also add that I commented out all the win9x code logic from resolv.rb. |
Hot damn, I love simple fixes. Wanna throw that and deleting the 9x logic (which I assume is gone from MRI as well) into a PR? Anything else we can do to make our versions more similar to or exactly like MRI would be VERY welcome. |
Just to clarify, the Windows 9x code I commented out was in resolv.rb. That's still in MRI. |
Ahh, well the fix alone will be fine then :-) I doubt JRuby could run on 9x, but I hate maintaining stdlib diffs. |
I ran into a similar issue and made the same change as @djberg96 above. Unfortunately for me this did not resolve my issue.
|
@michaelbuckner I realized after reading your post that I've had my gem source set to "http://rubygems.org" for a long time. I think I got fed up with openssl errors. But, even after setting it back to "https://rubygems.org" I don't see an error. Does it go away if you change your source to not use https? Not an ideal solution perhaps, but helps us nail down the issue. |
Nope, it does not. gem install rails --source http://rubygems.org |
Well, it was worth a shot. An NPE is a Java issue, though. Can you tell us more about your environment? Version of Windows, Java, etc. |
Windows 7 Ultimate 64bit |
@michaelbuckner I would file a separate issue. |
I did ; ) Thanks for your help. |
Apparently, it seems the issue was with the jRuby 9 pre installation On Thu, Jan 29, 2015 at 8:22 AM, Michael Buckner notifications@github.com
|
Closing the loop on this... The original issue was caused by win32/registry.rb not constructing wstrings properly. FFI will append a null character to strings, but only when declared as :string, which is currently always just a byte string. This should be improved, but in the short term since we're working with plain pointers we need to manually append the null bytes. I believe this is resolved by #2523, and we have a separate issue for the NPE that @michaelbuckner reported. |
Windows 7
jruby 9.0.0.0.pre1 (2.2.0p0) 2015-01-20 d537cab Java HotSpot(TM) Client VM 24.51-b03 on 1.7.0_51-b13 +jit [Windows 7-x86]
The text was updated successfully, but these errors were encountered: