Fallback to setting rails_env as server if no server host is found.

Return rails_env if no host is found, instead of failing to send request because no server is set.