Hi all ,

I am using Dir.chdir to change my current working directory.

class Test

  def initialize
    spin
  end

  def spin
    dire = "/c/Target/tioga-1.11/samples"
    dire2 = "c:\Target\tioga-1.11\samples"
    Dir.chdir(dire2)
    #system("cd", dire)
  end

end

My original project inundates with errors
"The System cannot find the path specified"
& this test program says no such file or directory.
Even on MSYS Dir.chdir(dire) does not work !

There are other Dir routines like Dir.each() which gives the error

    undefined method `each' for nil:NilClass  [version: 1.11]

Can you please help me correct these errors.
-- 
Posted via http://www.ruby-forum.com/.