enhanced handling of GS_* and RAILS_ENV environment variables