From: Christophe Broult Date: 2001-08-28T21:53:45+09:00 Subject: [ruby-talk:20471] RE: cygwin and win32 interaction (RE: Re: Bug i n require?) 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. ------_=_NextPart_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 ------_=_NextPart_001_01C12FC0.6F671F20 Content-Type: text/html RE: cygwin and win32 interaction (RE: [ruby-talk:20200] Re: Bug in require?)

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

------_=_NextPart_001_01C12FC0.6F671F20--