From: Herman Schultz Date: 2009-12-05T01:07:15+09:00 Subject: Re: Rake Environment variables gone missing t3ch.dude wrote: > On Dec 2, 4:44�pm, Herman Schultz wrote: >> So if I am going to try to slide under the limit ( if that indeed is my >> problem ) I'll need to identify those variables which devstudio needs to >> have resolved vs. what variables I can read from rake at run time. >> >> thanks again for the help. �I did try today, but I wasn't able to get >> under the limit. �I'll need a sharper knife. > > You know, since you're testing the size of the ENV hash, you can test > the sum of the sizes of the values and report it out, just to see if > that is in fact the problem. I'd hate to have sent you down the wrong > path... always best to test! > > -T3ch.dude No question it's the size. I wrote a little ruby script to fill up the environment and it the env gets whacked as the size approaches 32k. It does seem like there is a little wriggle room depending on how big the string that I am adding over and over again is, it fails at different sizes. require 'utilities.rb' i = 0 s = "X" 100.times { s += "X"} #puts s def env_size() result = 0 ENV.each do | key, value | result += value.length(); end return result end j = 0 whacked = false while ( ! whacked && j < 100000) env_count = ENV.size() verbose( ENV.size().to_s() + ":", 5) key = j.to_s() value = s; already_has_key = ENV.has_key?(key) ENV[key] = value.dup verbose(ENV.size().to_s()+":ENV[" + key + "] = " + value, 11) env_count = env_count + 1 if( env_count != ENV.size()) if ( already_has_key ) verbose("Variable already set.", 5) else verbose("ENV Hash whacked. " + ENV.size().to_s() + ":" + env_count.to_s() + " -> " + key, 1) whacked = true end end verbose( ENV.size().to_s(), 5) verbose( "Nmbr of Env entries = " + ENV.size().to_s(), 1) verbose( "Size of Environment = " + env_size().to_s(), 1) j += 1 end Well ok, thanks for the help. I guess I have to find a work around. -- Posted via http://www.ruby-forum.com/.