ENV.keys.to_json in the rails console
["SSH_AGENT_PID","rvm_bin_path","GEM_HOME","GPG_AGENT_INFO","TERM","SHELL","XDG_SESSION_COOKIE","IRBRC","WINDOWID","OLDPWD","GNOME_KEYRING_CONTROL","MY_RUBY_HOME","GTK_MODULES","USER","__array_start","XDG_SESSION_PATH","rvm_path","XDG_SEAT_PATH","SSH_AUTH_SOCK","SESSION_MANAGER","DEFAULTS_PATH","escape_flag","XDG_CONFIG_DIRS","rvm_prefix","PATH","DESKTOP_SESSION","PWD","GNOME_KEYRING_PID","LANG","MANDATORY_PATH","_second","UBUNTU_MENUPROXY","COMPIZ_CONFIG_PROFILE","GDMSESSION","rvm_version","SHLVL","HOME","LANGUAGE","GNOME_DESKTOP_SESSION_ID","_first","LOGNAME","COMPIZ_BIN_PATH","GEM_PATH","XDG_DATA_DIRS","DBUS_SESSION_BUS_ADDRESS","XDG_RUNTIME_DIR","DISPLAY","XDG_CURRENT_DESKTOP","RUBYVERSION","COLORTERM","XAUTHORITY","","BUNDLE_GEMFILE","BUNDLE_BIN_PATH","RUBYOPT","MAP_TILES_API_KEY","GOOGLE_ANALYTICS","S3_KEY","S3_BUCKET","S3_SECRET","LINES","COLUMNS"]
Very limited ENV available in the js.erb context all of a sudden.
ENV.keys.to_json (in the home.js.erb context) ["DATABASE_URL", "SSH_CLIENT", "USER", "MAIL", "RAILS_GROUPS", "SHLVL", "HOME", "LOGTOKEN", "LOGNAME", "", "RACK_ENV", "PATH", "LANG", "SHELL", "GEM_HOME", "RAILS_ENV", "GEM_PATH", "PWD", "SSH_CONNECTION", "REQUEST_ID", "_ORIGINAL_GEM_PATH", "BUNDLE_BIN_PATH", "BUNDLE_GEMFILE", "RUBYOPT"]
ENV.keys.to_json in the rails console ["SSH_AGENT_PID","rvm_bin_path","GEM_HOME","GPG_AGENT_INFO","TERM","SHELL","XDG_SESSION_COOKIE","IRBRC","WINDOWID","OLDPWD","GNOME_KEYRING_CONTROL","MY_RUBY_HOME","GTK_MODULES","USER","__array_start","XDG_SESSION_PATH","rvm_path","XDG_SEAT_PATH","SSH_AUTH_SOCK","SESSION_MANAGER","DEFAULTS_PATH","escape_flag","XDG_CONFIG_DIRS","rvm_prefix","PATH","DESKTOP_SESSION","PWD","GNOME_KEYRING_PID","LANG","MANDATORY_PATH","_second","UBUNTU_MENUPROXY","COMPIZ_CONFIG_PROFILE","GDMSESSION","rvm_version","SHLVL","HOME","LANGUAGE","GNOME_DESKTOP_SESSION_ID","_first","LOGNAME","COMPIZ_BIN_PATH","GEM_PATH","XDG_DATA_DIRS","DBUS_SESSION_BUS_ADDRESS","XDG_RUNTIME_DIR","DISPLAY","XDG_CURRENT_DESKTOP","RUBYVERSION","COLORTERM","XAUTHORITY","","BUNDLE_GEMFILE","BUNDLE_BIN_PATH","RUBYOPT","MAP_TILES_API_KEY","GOOGLE_ANALYTICS","S3_KEY","S3_BUCKET","S3_SECRET","LINES","COLUMNS"]