B
Brian Hartin
Hi all,
Something is wrong with my environment such that ruby occasionally gets
confused about the 'current directory'. I'm running ruby 1.8.6
(2010-02-04 patchlevel 398) [i386-mingw32] on Windows XP.
The root problem, which seems to break Rake, as well as gem installs, is
that under some situations it thinks the current directory is the
Windows USER_HOME, directory even when the script runs from another
directory.
One way to reproduce this is to create a script that prints the working
directory, e.g. 'puts Dir.pwd'. Next, run these commands in IRB from
the root dir, c:\
irb(main):001:0> Kernel.system('c:\ruby\bin\ruby.exe
c:\temp\printdir.rb')
"Current dir: C:/"
=> true
irb(main):001:0> Kernel.system('call c:\ruby\bin\ruby.exe
c:\temp\printdir.rb')
"Current dir: C:/Documents and Settings/hartbr"
=> true
I have reinstalled ruby, with no luck. It doesn't do this on a
co-workers machine. Does anyone have any advice?
Thanks,
Brian
Something is wrong with my environment such that ruby occasionally gets
confused about the 'current directory'. I'm running ruby 1.8.6
(2010-02-04 patchlevel 398) [i386-mingw32] on Windows XP.
The root problem, which seems to break Rake, as well as gem installs, is
that under some situations it thinks the current directory is the
Windows USER_HOME, directory even when the script runs from another
directory.
One way to reproduce this is to create a script that prints the working
directory, e.g. 'puts Dir.pwd'. Next, run these commands in IRB from
the root dir, c:\
irb(main):001:0> Kernel.system('c:\ruby\bin\ruby.exe
c:\temp\printdir.rb')
"Current dir: C:/"
=> true
irb(main):001:0> Kernel.system('call c:\ruby\bin\ruby.exe
c:\temp\printdir.rb')
"Current dir: C:/Documents and Settings/hartbr"
=> true
I have reinstalled ruby, with no luck. It doesn't do this on a
co-workers machine. Does anyone have any advice?
Thanks,
Brian