This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_ extPart_001_01C12FC0.6F671F20
Content-Type: text/plain
> -----Original Message-----
> From: Christophe Broult
[...]
>
> cd l:/
> ruby L:/tmp/foo.rb
> ~/bin
> /cygdrive/d/cbroult-softs/ruby/lib/ruby/site_ruby/1.6/i386-cygwin
> /cygdrive/d/cbroult-softs/ruby/lib/ruby/site_ruby/1.6
> /cygdrive/d/cbroult-softs/ruby/lib/ruby/site_ruby
> /cygdrive/d/cbroult-softs/ruby/lib/ruby/1.6/i386-cygwin
> /cygdrive/d/cbroult-softs/ruby/lib/ruby/1.6
> .
> L:/tmp
>
> L:/tmp/foo.rb:6:in `require': No such file to load -- bar (LoadError)
> from L:/tmp/foo.rb:6
>
> # foo.rb
> $: << File.dirname($0)
>
> puts $:.join("\n")
> puts
>
> require 'bar'
>
> # end foo.rb
>
> # bar.rb
> puts "#{$0} loaded"
>
> # end bar.rb
>
> Note that if I replace "ruby L:/tmp/foo.rb" with "ruby
> ~/tmp/foo.rb" this is working because my HOME var is set
> to "L:/". However I have a Ruby program on let's say D: this
> is not going to work.
(replying to my message)
using "ruby /cygdrive/l/tmp/foo.rb" works.
Christophe
------_ extPart_001_01C12FC0.6F671F20
Content-Type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV
ontent-Type" CONTENT ext/html; charset -ASCII">
<META NAME enerator" CONTENT S Exchange Server version 5.5.2653.12">
<TITLE>RE: cygwin and win32 interaction (RE: [ruby-talk:20200] Re: Bug in require?)</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE > -----Original Message-----</FONT>
<BR><FONT SIZE > From: Christophe Broult </FONT>
<BR><FONT SIZE [...]</FONT>
<BR><FONT SIZE > </FONT>
<BR><FONT SIZE > cd l:/</FONT>
<BR><FONT SIZE > ruby L:/tmp/foo.rb</FONT>
<BR><FONT SIZE > ~/bin</FONT>
<BR><FONT SIZE > /cygdrive/d/cbroult-softs/ruby/lib/ruby/site_ruby/1.6/i386-cygwin</FONT>
<BR><FONT SIZE > /cygdrive/d/cbroult-softs/ruby/lib/ruby/site_ruby/1.6</FONT>
<BR><FONT SIZE > /cygdrive/d/cbroult-softs/ruby/lib/ruby/site_ruby</FONT>
<BR><FONT SIZE > /cygdrive/d/cbroult-softs/ruby/lib/ruby/1.6/i386-cygwin</FONT>
<BR><FONT SIZE > /cygdrive/d/cbroult-softs/ruby/lib/ruby/1.6</FONT>
<BR><FONT SIZE > .</FONT>
<BR><FONT SIZE > L:/tmp</FONT>
<BR><FONT SIZE > </FONT>
<BR><FONT SIZE > L:/tmp/foo.rb:6:in `require': No such file to load -- bar (LoadError)</FONT>
<BR><FONT SIZE > from L:/tmp/foo.rb:6</FONT>
<BR><FONT SIZE > </FONT>
<BR><FONT SIZE > # foo.rb</FONT>
<BR><FONT SIZE > $: << File.dirname($0)</FONT>
<BR><FONT SIZE > </FONT>
<BR><FONT SIZE > puts $:.join("\n")</FONT>
<BR><FONT SIZE > puts</FONT>
<BR><FONT SIZE > </FONT>
<BR><FONT SIZE > require 'bar'</FONT>
<BR><FONT SIZE > </FONT>
<BR><FONT SIZE > # end foo.rb</FONT>
<BR><FONT SIZE > </FONT>
<BR><FONT SIZE > # bar.rb</FONT>
<BR><FONT SIZE > puts "#{$0} loaded"</FONT>
<BR><FONT SIZE > </FONT>
<BR><FONT SIZE > # end bar.rb</FONT>
<BR><FONT SIZE > </FONT>
<BR><FONT SIZE > Note that if I replace "ruby L:/tmp/foo.rb" with "ruby </FONT>
<BR><FONT SIZE > ~/tmp/foo.rb" this is working because my HOME var is set</FONT>
<BR><FONT SIZE > to "L:/". However I have a Ruby program on let's say D: this </FONT>
<BR><FONT SIZE > is not going to work. </FONT>
</P>
<P><FONT SIZE (replying to my message)</FONT>
</P>
<P><FONT SIZE using "ruby /cygdrive/l/tmp/foo.rb" works.</FONT>
</P>
<P><FONT SIZE Christophe</FONT>
</P>
</BODY>
</HTML>
------_ extPart_001_01C12FC0.6F671F20--