Fix Gem.ruby singleton method on Windows#1448
Merged
enebo merged 1 commit intojruby:masterfrom Jan 27, 2014
Merged
Conversation
Member
|
I am going to follow this up with a change to only use your logic when on Windows. |
enebo
added a commit
that referenced
this pull request
Jan 27, 2014
Fix Gem.ruby singleton method on Windows
enebo
added a commit
that referenced
this pull request
Jan 27, 2014
enebo
added a commit
that referenced
this pull request
Jan 27, 2014
Contributor
Author
|
That's fine. I was going to use the Gem.win_platform? method, but I don't On Monday, January 27, 2014, Thomas E Enebo notifications@github.com
|
Member
|
Ah yeah that might be. In the case of cygwin I think you will see unix style paths right? c:/ will not show up unless it is mount'd but I think that would need to be a user-provided path perhaps? Well I guess we will see... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This issue was identified when trying to install the murmurhash3 gem, which includes native extensions, on the Windows platform using the jruby-complete JAR file as the executable. This generated an error message as follows:
After digging in a bit, it looked like the problem was that there was an extraneous slash at the beginning of the result of the Gem.ruby singleton method call, causing the command to come out as
/C:/...instead of justC:/...I figured while I was in there, I'd extract the
Gem.jar_pathmethod and document what it's doing since it wasn't obvious to me at first glance what the "jarred_path" input string was going to look like.Full Disclosure: I didn't run all the unit tests myself to make sure things don't break because I don't have the whole JRuby development environment set up on my machine. I did, however, manually test the specific behavior related to this change on Windows 7 using both the system-installed jruby.exe and the jruby-complete.jar file, and also on CentOS 6.5.