Message from discussion
ruby under cygwin & windows paths
Path: g2news1.google.com!news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!news.n-ix.net!news2.arglkargh.de!noris.net!not-for-mail
From: Thomas <sanobast-20...@yahoo.de>
Newsgroups: comp.lang.ruby
Subject: Re: ruby under cygwin & windows paths
Date: Tue, 17 Jan 2006 17:32:27 +0900
Lines: 32
Message-ID: <dqia1t$rj6$1@sea.gmane.org>
References: <6faad9f00601120552k36bafb69x21176463ffc2f566@mail.gmail.com> <6faad9f00601130411j2e900e3enab58cec656b8d822@mail.gmail.com> <op.s3bjgztwlyznzu@obyvacka.chello.sk> <op.s3bkhxr9lyznzu@obyvacka.chello.sk> <6faad9f00601130856u42e25a07p21b9fa77638f29de@mail.gmail.com> <43C7E86B.1080803@yahoo.de> <6faad9f00601160836l62537eag140620d3ecdd9360@mail.gmail.com>
NNTP-Posting-Host: sinus.lauschmusik.de
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: ork-un.noris.net 1137486777 32693 213.95.32.201 (17 Jan 2006 08:32:57 GMT)
X-Complaints-To: news@noris.net
NNTP-Posting-Date: Tue, 17 Jan 2006 08:32:57 +0000 (UTC)
X-received-from: This message has been automatically forwarded from
the ruby-talk mailing list by a gateway at lauschmusik.de. If it is
SPAM, it did not originate at lauschmusik.de. Please report the
original sender, and not us. Thanks!
Please see http://hypermetrics.com/rubyhacker/clrFAQ.html#tag24 to.
In-Reply-To: <6faad9f00601160836l62537eag140620d3ecdd9360@mail.gmail.com>
X-ML-Name: ruby-talk
X-Mail-Count: 176028
X-ruby-talk: <dqia1t$rj...@sea.gmane.org>
X-rubymirror: yes
>> bash -c "ruby '$(cygpath -u %1)' %2 %3 %4 %5 %6 %7 %8 %9"
>
> Thanks again for all the proposals, but the part with "$(cygpath -u
> %1)" doesn't work:
> ruby: No such file or derectory -- $(cygpath -u ) (Load Error)
Okay, this is getting somewhat OT and should probably rather go to the
cygwin list. Anyway,
ruby.bat:
bash -c "ruby.exe $(cygpath -u '%1') %2 %3 %4 %5 %6 %7 %8 %9"
test.rb:
p $0, "Succeeded!"
At the command line (cmd.exe):
G:\>ruby.bat g:\tml\src\test.rb
"/mnt/g/tml/src/test.rb"
"Succeeded!"
$(foo) is equivalent to `foo`. A matter of taste.
Anyway, the solution with modifying RUBYLIB or some other env variable
should work too -- maybe in a wrapper of the script you're calling. In
general, I think mixing cygwin & native win apps isn't a good idea which
is why I would suggest to install either ruby4win or tetex4cygwin.
Cheers,
Thomas.