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

Christian MICHON <[email protected]> Tue, 6 Jan 2015 06:50:04 +0100
Newsgroups gmane.comp.lang.jruby.user
Message-ID <CACx2yF86r=GdNK58qxkJ=t=G32zWrGiCDh6+3OH8rNai5+HBDA@mail.gmail.com>
When using jruby, expand path will return paths using java. In your it is a
standard windows java instalation. You cannot expect a Cygwin path out of
it...

You need to use a Java setup compatible with Cygwin first.  I do not know
if this exists.
On Jan 6, 2015 12:40 AM, "Johan Wasserman" <[email protected]> wrote:

> 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
>
>
>