From: Herman Schultz Date: 2009-08-13T00:01:18+09:00 Subject: Re: Windows ENV object being corrupted Robert Klemme wrote: > 2009/8/11 Herman Schultz : >> now, but I still can't wrap my head around why size plays a factor. > I cannot either but this is due to the fact that I am missing > information in your original posting. For example, what is the format > of the "batch file" are you reading? What does variable "environment" > contain? > > robert What I do is write the output from 'set' on windows to a ruby string like this: environment = `call setEnvironment.bat;set` setEnvironment.bat is just a bunch of environment sets i.e.: SET LINK_PLATFORM=windows_32 The environment variables that were giving me trouble come from the system Ones like: ALLUSERSPROFILE=C:\Documents and Settings\All Users So I get the sense that spaces are the issue, I believe that quoting variables with spaces would probably solve the issue but I haven't tried it yet. -- Posted via http://www.ruby-forum.com/.