-
Notifications
You must be signed in to change notification settings - Fork 0
Common ENV variables
E. Lynette Rayle edited this page May 28, 2022
·
2 revisions
puts ENV['PATH'] # lists OS PATH variable
puts ENV['RUBYOPT'] # Any command line switches here will be added to any switches specified on the command line.
puts ENV['RUBYPATH'] # When used with the -S switch on the command line, the paths listed in RUBYPATH will be added to the
# paths searched when looking for Ruby scripts. The paths in RUBYPATH precede the paths listed in PATH.
puts ENV['RUBYLIB'] # The list of paths here will be added to the list of paths Ruby uses to search for libraries included
# in the program with the require method. The paths in RUBYLIB will be searched before other directories.
puts $LOAD_PATH # list directories that are searched on LOAD_PATH configured in /config/environment.rb