Ruby - Environment Variables
Ruby interpreter uses the following environment variables to control its behavior. The ENV object contains a list of all the current environment variables set.
|Sr.No.||Variable & Description|
Search path for dynamically loaded modules.
Directory moved to when no argument is passed to Dir::chdir. Also used by File::expand_path to expand "~".
Directory moved to when no arguments are passed to Dir::chdir and environment variable HOME isn't set.
Search path for executing subprocesses and searching for Ruby programs with the -S option. Separate each path with a colon (semicolon in DOS and Windows).
Search path for libraries. Separate each path with a colon (semicolon in DOS and Windows).
Used to modify the RUBYLIB search path by replacing prefix of library path1 with path2 using the format path1;path2 or path1path2.
Command-line options passed to Ruby interpreter. Ignored in taint mode (Where $SAFE is greater than 0).
With -S option, search path for Ruby programs. Takes precedence over PATH. Ignored in taint mode (where $SAFE is greater than 0).
Specifies shell for spawned processes. If not set, SHELL or COMSPEC are checked.
For Unix, use env command to see a list of all the environment variables.
HOSTNAME = ip-72-167-112-17.ip.secureserver.net RUBYPATH = /usr/bin SHELL = /bin/bash TERM = xterm HISTSIZE = 1000 SSH_CLIENT = 18.104.22.168 1742 22 SSH_TTY = /dev/pts/1 USER = amrood JRE_HOME = /usr/java/jdk/jre J2RE_HOME = /usr/java/jdk/jre PATH = /usr/local/bin:/bin:/usr/bin:/home/guest/bin MAIL = /var/spool/mail/guest PWD = /home/amrood INPUTRC = /etc/inputrc JAVA_HOME = /usr/java/jdk LANG = C HOME = /root SHLVL = 2 JDK_HOME = /usr/java/jdk LOGDIR = /usr/log/ruby LOGNAME = amrood SSH_CONNECTION = 22.214.171.124 1742 126.96.36.199 22 LESSOPEN = |/usr/bin/lesspipe.sh %s RUBYLIB = /usr/lib/ruby G_BROKEN_FILENAMES = 1 _ = /bin/env