
require doesn't seem to search $: on Win2K
Quote:
>i was just about to post a query regarding this problem, so i'll just
>provide a few more details... I'm using IIS 5, and i got .rb mapped to
>the ruby .exe in the standard way: '{ruby bin}\ruby.exe %s %s'. When i
>run a little script like Nick's i get the same result, except that
>/cygwin/ is prefixed to all the paths in $:. Also, i can get my scripts
>to work in IIS properly if i do this:
> - open a cmd window
> - start IRB
> - execute 'require "cgi"'
>As long as i leave IRB running, the scripts run by IIS will work
>properly. weird, huh? If the solution is to dump IIS and use Apache, i
>can live with that...
>cheers,
>ben
Ben,
I'm doing exactly the same thing with IIS 5.0. I also have cygwin installed,
but I don't know how IIS and ruby.exe would know anything about it, since
the mapping for the .rb files just points at ruby.exe.
The only way I've been able to work around it so far is to hard-code the
file path "E:\\ruby\\..." in the require statement.
Would anyone else like to speak up?
BTW, what do the second %s give you, and how do you access it?
Regards,
Nick