From: Brian Candler Date: 2010-08-03T15:27:40+09:00 Subject: Re: ENV['someapp']" is nil when the code is run with "sudo" Esen Sagynov wrote: > Can anyone explain why "sudo" neglects all ENVironmental variables? See "man sudoers": env_reset If set, sudo will reset the environment to only contain the LOGNAME, SHELL, USER, USERNAME and the SUDO_* variables. Any variables in the caller's environment that match the env_keep and env_check lists are then added. The default contents of the env_keep and env_check lists are displayed when sudo is run by root with the -V option. If the secure_path option is set, its value will be used for the PATH environment variable. This flag is on by default. -- Posted via http://www.ruby-forum.com/.