4. Environment Variables
You can control the behavior of RubyGems through the following environment variables.
- Name of user defined cache file to use when the site wide cache file is unwritable. (NOTE: we will probably rename this to GEM_CACHE in the next revision to be consistent with the other environment variables).
- Directory containing the master gem repository.
- Path list of directories containing gem repositories to be searched in addition to the GEM_HOME directory. The list should be delimited by the appropriate path separator (e.g. ‘:’ on Unix and ‘;’ on Windows)
- List of gems should should not be loaded (normally used for development). The list should be delimited by the appropriate path separator (e.g. ‘:’ on Unix and ‘;’ on Windows)
- Home directory of the user (see below).
- Drive containing the users home directory.
- Path to the user’s home directory.
http_proxy or HTTP_PROXY
- URL of the HTTP protocol proxy to be used to get out of the firewall. The lower case verion will be used first.
- Name of the make program that should be used to build extensions.
- Home directory of the user (used if HOME is not defined).
Finding the user’s home directory can be tricky across different systems. Gems tries the following in order until it finds one that works:
- Use HOME if it is defined.
- Use USERPROFILE if it is defined.
- Use HOMEDRIVE and HOMEPATH together if they are defined.
- Use the path you get by having Ruby expand “~”.
- Use “C:/” if you are on a Windows machine.