Set up environment variables and gems update