[jruby-user] Re: JRuby: gem install paths not working compared to Ruby

Johan Wasserman <[email protected]> Tue, 06 Jan 2015 00:40:02 +0100
Newsgroups gmane.comp.lang.jruby.user
Message-ID <[email protected]>
Christian,

rvm use jruby
Using /Johan_Wasserman.rvm/gems/jruby-1.7.18

jruby -S jgem install bundler
ERROR:  While executing gem ... (Errno::ENOENT)
    No such file or directory - 
C:\Johan_Wasserman.rvm\gems\jruby-1.7.18\gems\bundler-1.7.11


After finding a couple of issues reported on Jira and Github I suspect a 
bug in JRuby.

These tests confirm the suspicion:
jruby -S irb
irb(main):001:0> File.exists?('/Johan_Wasserman.rvm/test.txt')
=> true
irb(main):002:0> File.expand_path('/Johan_Wasserman.rvm/test.txt')
=> "C:/Johan_Wasserman.rvm/test.txt"
irb(main):003:0> File.absolute_path('/Johan_Wasserman.rvm/test.txt')
=> "C:/Johan_Wasserman.rvm/test.txt"
irb(main):004:0> File.dirname('/Johan_Wasserman.rvm/test.txt')
=> "/Johan_Wasserman.rvm"


My home path ion Cygwin is /Johan_Wasserman.rvm, translating to the 
Windows canonical path 
C:\Zones\Programs\xnix\cygwin64\Johan_Wasserman.rvm

expand_path and absolute_path both returned the windows path 
C:\Johan_Wasserman.rvm, which of course is incorrect, and therefore the 
gem installer cannot find the files it just downloaded.  I'm updating 
issue #2387 on Github with my findings.

-- 
Posted via http://www.ruby-forum.com/.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email