|
|
|
[
Permlink
| « Hide
]
Albert Strasheim - 20/May/07 02:54 AM
I am running into this same issue with the latest trunk build on Windows. I was previously able to install the Rails gems, so I'm not sure what's wrong now. I have GEM_HOME set correctly as far as I can tell.
I have reduced the problem to the following simple from what happens in rubygems/installer.rb around line 351:
directory = 'C:\jruby\jruby-1.0.0RC2\lib\ruby\gems/1.8/gems/cmdparse-2.0.2' On my system this prints: C:\jruby>jruby abspath.rb So what seems to be going wrong (at least on Windows) is that GEM_PATH should only use /, not \. Ugh...I don't know if there's even a way to fix this in JRuby. When we expand_path, we turn everything into / so this will never match. I'd say the only way this could ever work is if they do a better test in RubyGems. It's going to be near impossible for us to preserve the original / versus \ in the filename.
Sorry. This isn't a JRuby issue. Rubygems, in installer.rb, checks to see if File.expand_path(<GEM_HOME_PATH>) == <GEM_HOME_PATH>. The problem, in my case, is that I have my GEM_HOME keyed to my JRuby install through a soft link. This was foolish of me actually – but possibly reasonable for testing gems against particular Ruby interpreter versions.
In any event, File.expand_path resolves the soft link to it's real path which causes the equality check to fail and hence my error. For me, this means that I'll be migrating my JRuby GEM_HOME external to my JRuby installations. However, this may be something worth taking up with the Rubygems fellas. Woops. Should've read your comment better before posting mine.
Still, I agree that this problem should possibly be resolved through Rubygems. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||